Re: calling parent class method from the outside
| From: | admin | Date: | Tue, 03 Jul 2007 12:07:30 +0000 |
| Subject: | Re: calling parent class method from the outside | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-258103@lists.php.net to get a copy of this message | ||
Jochem Maas wrote:
admin wrote:I knew it could be, and it is described at the top: http://www.php.net/manual/en/language.oop5.basic.php Thanks.Jochem Maas wrote:...it is documented - where do you think I find out about it?the 'callback' type has a number of forms: 'myFunc' array('className', 'myMeth') array(self, 'myMeth') array(parent, 'myMeth') array($object, 'myMeth') self and parent adhere to the same 'context' rules when used in call_user_func*() as when you use them directly - whether $this is present within the scope of the called method is essentially down to whether the method being called is defined as static or not. AFAIK call_user_func*() respects PPP modifiers and works transparently with regard to access to the relevant object variable ($this)This undocumented (?) feature is fairly nice.