コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function extractFromReflection(ClassReflectionInterface $classReflection)
 {
     $this->classReflection = $classReflection;
     $properties = [];
     foreach (['property', 'property-read', 'property-write'] as $annotationName) {
         if ($this->classReflection->hasAnnotation($annotationName)) {
             foreach ($this->classReflection->getAnnotation($annotationName) as $annotation) {
                 $properties += $this->processMagicPropertyAnnotation($annotation, $annotationName);
             }
         }
     }
     return $properties;
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function extractFromReflection(ClassReflectionInterface $reflectionClass)
 {
     $this->reflectionClass = $reflectionClass;
     $methods = [];
     if ($reflectionClass->hasAnnotation('method')) {
         foreach ($reflectionClass->getAnnotation('method') as $annotation) {
             $methods += $this->processMagicMethodAnnotation($annotation);
         }
     }
     return $methods;
 }