RE: [PHP] OO question

From: Date: Wed, 12 Dec 2001 02:02:15 +0000
Subject: RE: [PHP] OO question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-77391@lists.php.net to get a copy of this message
You can use the special name "parent". e.g.: parent::baseClassFunction(); -----Original Message----- From: christian calloway [mailto:dcminds@yahoo.com] Sent: Saturday, December 08, 2001 2:16 PM To: php-general@lists.php.net Subject: [PHP] OO question I want to be able to override a function/method in a parent class, but then call that function/method from within the overriden function in the child class. The Zend documentation states you can do this: "In PHP 4.0 you can call member functions of other classes from within member functions or from within the global scope. You can now, for instance, override a parent function with a child function, and then call the parent function from it." But how do you do it? From the following syntax: class childclass extends parentclass .. function overridenFunction() { // call parent function wich this function overrides. $this->overridenFunction() ... } Would the method being calling the parent method or would it be calling itself? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#77391) next »