Beispiel #1
0
 /**
  * @param ParsedReflectionClass|ParsedReflectionMethod|ParsedReflectionProperty $point
  * {@inheritdoc}
  */
 public function matches($point)
 {
     $expectedClass = $this->expectedClass;
     if (!$point instanceof $expectedClass) {
         return false;
     }
     $aliases = $point->getNamespaceAliases();
     $this->annotationReader->setImports($aliases);
     $annotation = $this->annotationReader->{$this->annotationMethod}($point, $this->annotationName);
     return (bool) $annotation;
 }
 /**
  * Return the list of additional qualifiers for parameters
  *
  * @param ReflectionMethod $ctor
  * @return Qualifier[]
  */
 private function getQualifiers(ReflectionMethod $ctor)
 {
     $qualifiers = array();
     $annotations = $this->reader->getMethodAnnotations($ctor);
     foreach ($annotations as $annotation) {
         if ($annotation instanceof Qualifier) {
             $qualifiers[$annotation->value] = $annotation;
         }
     }
     return $qualifiers;
 }