Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SimpleAnnotationReader.php

function SimpleAnnotationReader::getMethodAnnotation

Overrides Reader::getMethodAnnotation

File

core/lib/Drupal/Component/Annotation/Doctrine/SimpleAnnotationReader.php, line 137

Class

SimpleAnnotationReader
Simple Annotation Reader.

Namespace

Drupal\Component\Annotation\Doctrine

Code

public function getMethodAnnotation(\ReflectionMethod $method, $annotationName) {
    foreach ($this->getMethodAnnotations($method) as $annotation) {
        if ($annotation instanceof $annotationName) {
            return $annotation;
        }
    }
    return null;
}
RSS feed
Powered by Drupal