00001 <?php 00019 class ExtendedReflectionParameter extends ReflectionParameter 00020 { 00026 public final function getDeclaringClass() 00027 { 00028 return $this->createExtendedReflectionClass( parent::getDeclaringClass() ); 00029 } 00030 00036 public final function getClass() 00037 { 00038 if( parent::getClass() == null ) 00039 { 00040 return null; 00041 } 00042 return $this->createExtendedReflectionClass( parent::getClass() ); 00043 } 00044 00050 public final function getDeclaringFunction() 00051 { 00052 $objReflectionFunction = $this->createExtendedReflectionFunction( parent::getDeclaringFunction() ); 00053 } 00054 00064 protected function createExtendedReflectionClass( ReflectionClass $objOriginalReflectionClass ) 00065 { 00066 return new ExtendedReflectionClass( $objOriginalReflectionClass->getName() ); 00067 } 00068 00078 protected function createExtendedReflectionMethod( ReflectionMethod $objOriginalReflectionMethod ) 00079 { 00080 return new ExtendedReflectionMethod( $this->getName() , $objOriginalReflectionMethod->getName() ); 00081 } 00082 00092 protected function createExtendedReflectionFunction( ReflectionFunction $objOriginalReflectionFunction ) 00093 { 00094 if( $objOriginalReflectionFunction instanceof ReflectionMethod ) 00095 { 00096 return new ExtendedReflectionMethod( $objOriginalReflectionFunction->getName() ); 00097 } 00098 else 00099 { 00100 return new ExtendedReflectionFunction( $objOriginalReflectionFunction->getName() ); 00101 } 00102 } 00103 } 00104 00105 ?>
1.5.9