Example #1
0
 public function run($context)
 {
     foreach ($this as $annotation) {
         if ($handler = Helper::getAnnotationHandler($annotation)) {
             $handler->run($this->reflector, $context);
         }
     }
 }
Example #2
0
 private static function callPropertyAnnotationHandlers($reflClass, $instance, $counter)
 {
     foreach ($reflClass->getProperties() as $property) {
         $hasAnnotation = $property->hasAnnotation(Autowired::class);
         if ($hasAnnotation) {
             $annotation = $property->getAnnotation(Autowired::class);
             Helper::getAnnotationHandler(get_class($annotation))->run($property, $instance);
         }
     }
 }