Calling parent function with call_user_func_array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm a self-confessed PHP newb (first step towards a cure, right?), so
apologies in advance for what may be a basic question.  I spent an hour
searching for an answer to this and couldn't find one.  

I found one post that said there was a problem with this in 5.0.3, but
it didn't indicate whether the fix was also applied to the PHP4 branch.

I'm using PHP v4.4.7.  I have class B which extends class A.  I'm
overriding a function that is normally called with a variable number of
parameters via call_user_func_array.  How do I call the class A
implementation of the function using call_user_func_array from the class
B implementation?

class A {
  function doSomething($elements, $level) {
    ...
  }
}

Class B extends A {
  function doSomething($elements, $level) {
    ...
    call_user_func_array(/*class A implementation of doSomething*/,
args); 
  }
}

Thanks in advance for any help!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux