function SimpleAnnotationReader::getMethodAnnotations
Same name and namespace in other branches
- 11.x core/lib/Drupal/Component/Annotation/Doctrine/SimpleAnnotationReader.php \Drupal\Component\Annotation\Doctrine\SimpleAnnotationReader::getMethodAnnotations()
- 10 core/lib/Drupal/Component/Annotation/Doctrine/SimpleAnnotationReader.php \Drupal\Component\Annotation\Doctrine\SimpleAnnotationReader::getMethodAnnotations()
- 9 core/lib/Drupal/Component/Annotation/Doctrine/SimpleAnnotationReader.php \Drupal\Component\Annotation\Doctrine\SimpleAnnotationReader::getMethodAnnotations()
- 8.9.x core/lib/Drupal/Component/Annotation/Doctrine/SimpleAnnotationReader.php \Drupal\Component\Annotation\Doctrine\SimpleAnnotationReader::getMethodAnnotations()
Gets the annotations applied to a method.
Parameters
ReflectionMethod $method The ReflectionMethod of the method from which: the annotations should be read.
Return value
array<object> An array of Annotations.
File
-
core/
lib/ Drupal/ Component/ Annotation/ Doctrine/ SimpleAnnotationReader.php, line 115
Class
- SimpleAnnotationReader
- Simple Annotation Reader.
Namespace
Drupal\Component\Annotation\DoctrineCode
public function getMethodAnnotations(\ReflectionMethod $method) {
return $this->parser
->parse($method->getDocComment(), 'method ' . $method->getDeclaringClass()->name . '::' . $method->getName() . '()');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.