OO question

From: Date: Sat, 08 Dec 2001 22:16:08 +0000
Subject: OO question
Groups: php.general 
Request: Send a blank email to php-general+get-77387@lists.php.net to get a copy of this message
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?

« previous php.general (#77387) next »