
Public Member Functions | |
| getDeclaringClass () | |
| getParameters () | |
Protected Member Functions | |
| createExtendedReflectionClass (ReflectionClass $objOriginalReflectionClass) | |
| createExtendedReflectionParameter (ReflectionParameter $objReflectionParameter) | |
Reflection classes can be a problem because the reflection methods what return objects will return the original reflection object and not the extended version of it. So it is necessary to create methods what convert the original methods to return the extended version of the objects.
Definition at line 20 of file ExtendedReflectionMethod.class.php.
| createExtendedReflectionClass | ( | ReflectionClass $ | objOriginalReflectionClass | ) | [protected] |
Convert a reflection class into a extended reflection class
This is the method what should be replaced when this class be extended.
| ReflectionClass | $objOriginalReflectionClass |
Reimplemented in CodeInstrumentationMethod, and CodeReflectionMethod.
Definition at line 59 of file ExtendedReflectionMethod.class.php.
Referenced by getDeclaringClass().
00060 { 00061 return new ExtendedReflectionClass( $objOriginalReflectionClass->getName() ); 00062 }
| createExtendedReflectionParameter | ( | ReflectionParameter $ | objReflectionParameter | ) | [protected] |
Convert a reflection parameter into a extended reflection parameter
This is the method what should be replaced when this class be extended.
| ReflectionParameter | $objReflectionParameter |
Reimplemented in CodeInstrumentationMethod, and CodeReflectionMethod.
Definition at line 73 of file ExtendedReflectionMethod.class.php.
References getDeclaringClass().
Referenced by getParameters().
00074 { 00075 return new ExtendedReflectionParameter( Array( $this->getDeclaringClass()->getName() , $this->getName() ) , $objReflectionParameter->getName() ); 00076 }
| getDeclaringClass | ( | ) |
Get the class owner of the reflected method
Definition at line 27 of file ExtendedReflectionMethod.class.php.
References createExtendedReflectionClass().
Referenced by createExtendedReflectionParameter(), CodeReflectionMethod::createExtendedReflectionParameter(), and CodeInstrumentationMethod::createExtendedReflectionParameter().
00028 { 00029 $objReflectionClass = parent::getDeclaringClass(); 00030 return $this->createExtendedReflectionClass( $objReflectionClass ); 00031 }
| getParameters | ( | ) |
Get the collection of the parameters of the reflected method
Definition at line 38 of file ExtendedReflectionMethod.class.php.
References createExtendedReflectionParameter().
Referenced by CodeReflectionMethod::createParametersCode().
00039 { 00040 $arrReflectionParameters = parent::getParameters(); 00041 $arrExtendedParameters = array(); 00042 foreach( $arrReflectionParameters as $objReflectionParameter ) 00043 { 00044 /*@var $objReflectionParameter ReflectionParameter */ 00045 $arrExtendedParameters[] = $this->createExtendedReflectionParameter( $objReflectionParameter ); 00046 } 00047 return $arrExtendedParameters; 00048 }
1.5.9