как вызвать метод родителя с переменным числом параметров?

как вызвать метод родителя с переменным числом параметров?

В PHP 4.3.x необходимо сделать нечто вроде
PHP:
parent::method($this->name, {$arg1, ..., $argN});
PHP:
class Base
{
    var $name = 'Base';

    function method()
    {
       $args = func_get_args();
       array_unshift($args, $this->name);

       print_r($args);
     }
}

class Sub extends Base
{
    var $name = 'Sub';

    function method()
    {
       $args = func_get_args();
       array_unshift($args, $this->name);
        
        call_user_func_array(array('parent','method'), $args);
       /* не работает, пытается найти класс с именем 'parent' */

        call_user_func_array(array(get_parent_class(),'method'), $args);
       /* вызывает статически */
    }
}
 

crocodile2u

http://vbolshov.org.ru
В классе Sub переименуй метод method во что-нибудь другое. Далее:

PHP:
call_user_func_array(array(& $this,'method'), $args);
 

bgm

 
Приведите, пожалуйста, пример желаемого результата вот такого вызова:
PHP:
 $ex = new Sub;
$ex->method();
 
От наследования пришлось отказаться, привожу решение:
PHP:
class Sub // uses Base 
{ 
    var $name = 'Sub';
    var $base;
    function Sub()
    {
        $base = new Base();
    }

    function method() 
    { 
        $args = func_get_args(); 
        array_unshift($args, $this->name);          
        call_user_func_array(array(&$this->base,'method'), $args); 
    } 
}
 
Сверху