public function CachedReader::getMethodAnnotation

Get selected method annotation

Parameters

\ReflectionMethod $method:

string $annotationName:

Return value

null

Overrides Reader::getMethodAnnotation

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/CachedReader.php, line 182

Class

CachedReader
A cache aware annotation reader.

Namespace

Doctrine\Common\Annotations

Code

public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) {
  foreach ($this
    ->getMethodAnnotations($method) as $annot) {
    if ($annot instanceof $annotationName) {
      return $annot;
    }
  }
  return null;
}