You are here

public function AnnotationReader::getMethodAnnotations in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php \Doctrine\Common\Annotations\AnnotationReader::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 An array of Annotations.

Overrides Reader::getMethodAnnotations

1 call to AnnotationReader::getMethodAnnotations()
AnnotationReader::getMethodAnnotation in vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php
Gets a method annotation.

File

vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php, line 248

Class

AnnotationReader
A reader for docblock annotations.

Namespace

Doctrine\Common\Annotations

Code

public function getMethodAnnotations(ReflectionMethod $method) {
  $class = $method
    ->getDeclaringClass();
  $context = 'method ' . $class
    ->getName() . '::' . $method
    ->getName() . '()';
  $this->parser
    ->setTarget(Target::TARGET_METHOD);
  $this->parser
    ->setImports($this
    ->getMethodImports($method));
  $this->parser
    ->setIgnoredAnnotationNames($this
    ->getIgnoredAnnotationNames($class));
  return $this->parser
    ->parse($method
    ->getDocComment(), $context);
}