/** * @return string */ public static function getAnnotationName() { return ClassName::getShortName(AutoWire::class); }
/** * @return string */ public static function getAnnotationName() { return ClassName::getShortName(Cacheable::class); }
/** * @return string */ public static function getAnnotationName() { return ClassName::getShortName(BeforeLoad::class); }
/** * @return string */ public static function getAnnotationName() { return ClassName::getShortName(Required::class); }
/** * @return string */ public static function getAnnotationName() { return ClassName::getShortName(MethodInit::class); }
/** * @return string */ public static function getAnnotationName() { return ClassName::getShortName(RootProject::class); }
/** * @return string */ public static function getAnnotationName() { return ClassName::getShortName(LoadContext::class); }
/** * @return string */ public static function getAnnotationName() { return ClassName::getShortName(AfterCall::class); }
/** * Dispatch events * @param \Reflector $reflector * @param $eventNameBase */ private function dispatchEventForAnnotation(\Reflector $reflector, $eventNameBase) { $annotationReader = $this->getSphringEventDispatcher()->getSphringBoot()->getSphringAnnotationReader(); if ($reflector instanceof \ReflectionClass) { $annotationsArray = $annotationReader->getClassAnnotations($reflector); } else { $annotationsArray = $annotationReader->getMethodAnnotations($reflector); } if (empty($annotationsArray)) { return; } $toReturn = null; foreach ($annotationsArray as $annotation) { $eventName = $eventNameBase . strtolower(ClassName::getShortName($annotation)); $event = new EventAnnotation(); $event->setData($annotation); $event->setBean($this->bean); $event->setReflector($reflector); $event->setMethodArgs($this->methodArgs); $event->setName($eventName); $this->sphringEventDispatcher->dispatch($eventName, $event); $this->methodArgs = $event->getMethodArgs(); if ($annotation != $event->getData()) { $toReturn = $event->getData(); } } $this->toReturn = $toReturn; }