コード例 #1
0
 /**
  * Replacement for the original getMethods() method which makes sure
  * that Tx_Extbase_Reflection_MethodReflection objects are returned instead of the
  * orginal ReflectionMethod instances.
  *
  * @param  long $filter: A filter mask
  * @return Tx_Extbase_Reflection_MethodReflection Method reflection objects of the methods in this class
  */
 public function getMethods($filter = NULL)
 {
     $extendedMethods = array();
     $methods = $filter === NULL ? parent::getMethods() : parent::getMethods($filter);
     foreach ($methods as $method) {
         $extendedMethods[] = new Tx_ExtensionBuilder_Reflection_MethodReflection($this->getName(), $method->getName());
     }
     return $extendedMethods;
 }
コード例 #2
0
ファイル: Service.php プロジェクト: NaveedWebdeveloper/Test
 /**
  * Reflects the given class and stores the results in this service's properties.
  *
  * @param string $className Full qualified name of the class to reflect
  * @return void
  */
 protected function reflectClass($className)
 {
     $class = new Tx_Extbase_Reflection_ClassReflection($className);
     $this->reflectedClassNames[$className] = time();
     foreach ($class->getTagsValues() as $tag => $values) {
         if (array_search($tag, $this->ignoredTags) === FALSE) {
             $this->taggedClasses[$tag][] = $className;
             $this->classTagsValues[$className][$tag] = $values;
         }
     }
     foreach ($class->getProperties() as $property) {
         $propertyName = $property->getName();
         $this->classPropertyNames[$className][] = $propertyName;
         foreach ($property->getTagsValues() as $tag => $values) {
             if (array_search($tag, $this->ignoredTags) === FALSE) {
                 $this->propertyTagsValues[$className][$propertyName][$tag] = $values;
             }
         }
     }
     foreach ($class->getMethods() as $method) {
         $methodName = $method->getName();
         foreach ($method->getTagsValues() as $tag => $values) {
             if (array_search($tag, $this->ignoredTags) === FALSE) {
                 $this->methodTagsValues[$className][$methodName][$tag] = $values;
             }
         }
         foreach ($method->getParameters() as $parameterPosition => $parameter) {
             $this->methodParameters[$className][$methodName][$parameter->getName()] = $this->convertParameterReflectionToArray($parameter, $parameterPosition, $method);
         }
     }
     ksort($this->reflectedClassNames);
     $this->dataCacheNeedsUpdate = TRUE;
 }