ExtendedReflectionClass.class.php

Go to the documentation of this file.
00001 <?php
00020 class ExtendedReflectionClass extends ReflectionClass
00021 {
00028         public final function getParentClass()
00029         {
00030         $objParent = parent::getParentClass();
00031         if( $objParent != null )
00032         {
00033             return $this->createExtendedReflectionClass(  $objParent );
00034         }
00035         else
00036         {
00037             return null;
00038         }
00039         }
00040 
00047         public final function getInterfaces()
00048         {
00049                 $arrOriginalInterfaces = parent::getInterfaces();
00050                 $arrExtendedInterfaces = array();
00051                 foreach( $arrOriginalInterfaces as $objInterface )
00052                 {
00053                         /*@var $objInterface ReflectionClass */
00054                         $arrExtendedInterfaces[] = $this->createExtendedReflectionClass( $objInterface );
00055                 }
00056                 return $arrExtendedInterfaces;
00057         }
00058 
00066         public final function getProperties( $filter = -1 )
00067         {
00068                 $arrReflectionProperties = parent::getProperties( $filter );
00069                 $arrExtendedProperties = array();
00070                 foreach( $arrReflectionProperties as $objReflectionProperty )
00071                 {
00072                         /*@var $objReflectionProperty ReflectionProperty */
00073                         $arrExtendedProperties[] = $this->createExtendedReflectionProperty( $objReflectionProperty );
00074                 }
00075                 return $arrExtendedProperties;
00076         }
00077 
00085     public final function getProperty( $strName )
00086     {
00087         return $this->createExtendedReflectionProperty( parent::getProperty( $strName ) );
00088     }
00089 
00096     public final function getMethods( $filter = -1 )
00097     {
00098         $arrReflectionMethods = parent::getMethods( $filter );
00099         $arrExtendedMethods = array();
00100         foreach( $arrReflectionMethods as $objReflectionMethod )
00101         {
00102                 /*@var $objReflectionMethod ReflectionMethod */
00103                 $arrExtendedMethods[] = $this->createExtendedReflectionMethod( $objReflectionMethod );
00104         }
00105         return $arrExtendedMethods;
00106     }
00107 
00114     public final function getMethod( $strMethodName )
00115     {
00116         return $this->createExtendedReflectionMethod( parent::getMethod( $strMethodName ) );
00117     }
00118 
00128         protected function createExtendedReflectionClass( ReflectionClass $objOriginalReflectionClass )
00129         {
00130                 return new ExtendedReflectionClass( $objOriginalReflectionClass->getName() );
00131         }
00132 
00142         protected function createExtendedReflectionProperty( ReflectionProperty $objOriginalReflectionProperty )
00143         {
00144                 return new ExtendedReflectionProperty( $this->getName() , $objOriginalReflectionProperty->getName() );
00145         }
00146 
00156         protected function createExtendedReflectionMethod( ReflectionMethod $objOriginalReflectionMethod )
00157         {
00158                 return new ExtendedReflectionMethod( $this->getName() , $objOriginalReflectionMethod->getName() );
00159         }
00160 }
00161 
00162 ?>

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