Ejemplo n.º 1
0
 protected function matchesAnnotations(InfoInterface $info)
 {
     $result = new PointcutMatch();
     foreach ($this->annotationFilters as $filter) {
         $match = $filter->matches($info);
         if ($match === NULL) {
             return;
         }
         $result->mergeWith($match);
     }
     return $result;
 }
Ejemplo n.º 2
0
 public function matches(TypeInfoManagerInterface $manager, TypeInfoInterface $type, InfoInterface $point = NULL, $read = true)
 {
     $match = new PointcutMatch();
     $sub = $this->matchesAnnotations($type);
     if ($sub === NULL) {
         return;
     }
     $match->exposeTarget($this->target);
     if (preg_match($this->nameRegex, $type->getName())) {
         return $match;
     }
     foreach ($type->getSupertypes($manager, true) as $supertype) {
         if (preg_match($this->nameRegex, $supertype->getName())) {
             return $match;
         }
     }
 }