Inheriting from an extension class

From: Date: Thu, 17 Aug 2000 11:19:17 +0000
Subject: Inheriting from an extension class
Groups: php.dev 
Request: Send a blank email to php-dev+get-29252@lists.php.net to get a copy of this message
I was unable to get the latest version of Zend (no route to host) before sending this letter, so if my PHP is a few days old... First, consider this simple PHP code: // works $obj = new OrbitObject($ior); class MyObject extends OrbitObject { function MyObject($ior) { // gives "Call to undefined function: orbitobject()" OrbitObject::OrbitObject($ior); } } // does not work $myobj = new MyObject($ior); Now, OrbitObject is a class in my PHP extension. It is initialized with INIT_OVERLOADED_CLASS_ENTRY and function calls are not static but go through the handle_function_call member of zend_class_entry. What I believe happens above is that only static members in the parent class are recognized when using the child class. This makes it inpossible to inherit a class with dynamic functions, which I would like to be able to do. Is this a deliberate limitation or is something that could be implemented? I have not studied the source code for these things yet, but I will do that right now. Regards, -\- David Eriksson -/- "An expert in a particular computer language is really an expert in the work-arounds necessary to use this language to perform useful work." - Richard B. Johnson

« previous php.dev (#29252) next »