Re: calling parent class method from the outside

From: Date: Tue, 03 Jul 2007 11:34:46 +0000
Subject: Re: calling parent class method from the outside
References: 1 2 3 4 5 6  Groups: php.general 
Request: Send a blank email to php-general+get-258102@lists.php.net to get a copy of this message
admin wrote: > Jochem Maas wrote: ... >> >> 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. it is documented - where do you think I find out about it? > Unfortunately there's no $this outside the class. this seems painfully obvious - not sure why this is a problem it's not like $this is javascript. >

« previous php.general (#258102) next »