public function extractFromReflection(ClassReflectionInterface $reflectionClass) { $this->reflectionClass = $reflectionClass; $methods = []; if ($reflectionClass->hasAnnotation('method')) { foreach ($reflectionClass->getAnnotation('method') as $annotation) { $methods += $this->processMagicMethodAnnotation($annotation); } } return $methods; }
/** * {@inheritdoc} */ public function getOwnMagicMethods() { if ($this->ownMagicMethods === null) { $this->ownMagicMethods = []; if ($this->classReflection->isVisibilityLevelPublic() && $this->classReflection->getDocComment()) { $extractor = new AnnotationMethodExtractor($this->classReflection->getReflectionFactory()); $this->ownMagicMethods += $extractor->extractFromReflection($this->classReflection); } } return $this->ownMagicMethods; }