Inside the body of method foo() you can of course use syntax like
parent::foo(). But is there a way to call the parent version of
obj->foo() outside the class? That kind of syntax is allowed in C++, for
example: Aclass a; if (a.Aparent::foo()) ...;
Some contrived example to illustrate the point:
class AParent {
public function foo() { .. }
}
class A extends AParent {
public function foo() {
doit($this, __CLASS__, __FUNCTION__);
}
}
function doit($obj, $classname, $funcname) {
if (...)
// $obj->classname_parent::$funcname();
}
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php