Edit report at http://bugs.php.net/bug.php?id=51928&edit=1

 ID:          51928
 Updated by:  johan...@php.net
 Reported by: ck-php at mohiva dot com
 Summary:     Create a method to register extended class
-Status:      Open
+Status:      Wont fix
 Type:        Feature/Change Request
 Package:     Reflection related
 PHP Version: 5.3.2

 New Comment:

It is suggested to use composition (has-a) instead of subtyping (is-a)
for the reflection instances. Adding support to return custom types
isn't planned.


Previous Comments:
------------------------------------------------------------------------
[2010-05-27 12:04:39] ck-php at mohiva dot com

Description:
------------
Reflection classes can be extended but the parent classes doesn't make
the usage of other extended classes.



As an example we extend the ReflectionClass and the ReflectionMethod
class.



CustomReflectionClass extends ReflectionClass {



}



CustomReflectionMethod extends ReflectionMethod {



}



When using the CustomReflectionClass::getMethods method it returns an
array of ReflectionMethod objects. It should be a possibility to
register the CustomReflectionMethod class so that these will be returned
by the CustomReflectionClass::getMethods method.



For the DOM extensions it exists the DOMDocument::registerNodeClass
method for this scenario.



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51928&edit=1

Reply via email to