public function run($context) { foreach ($this as $annotation) { if ($handler = Helper::getAnnotationHandler($annotation)) { $handler->run($this->reflector, $context); } } }
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); } } }