function AnnotationReader::getFunctionAnnotations
Gets the annotations applied to a function.
@phpstan-return list<object> An array of Annotations.
1 call to AnnotationReader::getFunctionAnnotations()
- AnnotationReader::getFunctionAnnotation in vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ AnnotationReader.php - Gets a function annotation.
File
-
vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ AnnotationReader.php, line 237
Class
- AnnotationReader
- A reader for docblock annotations.
Namespace
Doctrine\Common\AnnotationsCode
public function getFunctionAnnotations(ReflectionFunction $function) : array {
$context = 'function ' . $function->getName();
$this->parser
->setTarget(Target::TARGET_FUNCTION);
$this->parser
->setImports($this->getImports($function));
$this->parser
->setIgnoredAnnotationNames($this->getIgnoredAnnotationNames($function));
$this->parser
->setIgnoredAnnotationNamespaces(self::$globalIgnoredNamespaces);
return $this->parser
->parse($function->getDocComment(), $context);
}