/** * */ private function dispatchAnnotations() { $bean = new Bean(get_class($this)); $bean->setObject($this); $annotationDispatcher = new AnnotationsDispatcher($bean, get_class($this), $this->sphring->getSphringEventDispatcher()); $annotationDispatcher->dispatchAnnotations(); }
/** * @param \ReflectionMethod[] $methods * @param AbstractBean $bean * @return array */ private function getAfterCallMethod($methods, AbstractBean $bean) { $afterCall = []; foreach ($methods as $method) { $methodName = $method->getName(); $afterCall[$methodName] = function ($proxy, $instance, $method, $params, $returnValue, &$returnEarly) use($methodName, $bean) { $annotationDispatcher = new AnnotationsDispatcher($bean, $bean->getClass(), $bean->getSphringEventDispatcher()); $params['#result'] = $returnValue; $annotationDispatcher->setMethodArgs($params); if ($returnValue !== null) { $returnEarly = true; } $toReturnAfter = $annotationDispatcher->dispatchAnnotationMethodCallAfter($methodName); if ($toReturnAfter !== null) { $returnEarly = true; $returnValue = $toReturnAfter; } return $returnValue; }; } return $afterCall; }
/** * */ protected function dispatchAnnotations() { $annotationDispatcher = new AnnotationsDispatcher($this, $this->class, $this->sphringEventDispatcher); $annotationDispatcher->dispatchAnnotations(); }