ExtendedReflectionMethod Class Reference

Inheritance diagram for ExtendedReflectionMethod:

ReflectionMethod CodeReflectionMethod CodeInstrumentationMethod

List of all members.

Public Member Functions

 getDeclaringClass ()
 getParameters ()

Protected Member Functions

 createExtendedReflectionClass (ReflectionClass $objOriginalReflectionClass)
 createExtendedReflectionParameter (ReflectionParameter $objReflectionParameter)


Detailed Description

Class what make possible and easy extend reflection method

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.

Author:
Thiago Henrique Ramos da Mata <thiago.henrique.mata@gmail.com>

Definition at line 20 of file ExtendedReflectionMethod.class.php.


Member Function Documentation

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.

Parameters:
ReflectionClass $objOriginalReflectionClass
Returns:
ExtendedReflectionClass

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.

Parameters:
ReflectionParameter $objReflectionParameter
Returns:
ExtendedReflectionParameter

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

Returns:
ExtendedReflectionClass

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

Returns:
ExtendedReflectionParameter[]

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     }


The documentation for this class was generated from the following file:

Generated on Thu Feb 3 03:55:03 2011 for CodeToDiagram by  doxygen 1.5.9