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

Breadcrumb

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

function SimpleAnnotationReader::getClassAnnotation

Overrides Reader::getClassAnnotation

File

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

Class

SimpleAnnotationReader
Simple Annotation Reader.

Namespace

Drupal\Component\Annotation\Doctrine

Code

public function getClassAnnotation(\ReflectionClass $class, $annotationName) {
    foreach ($this->getClassAnnotations($class) as $annotation) {
        if ($annotation instanceof $annotationName) {
            return $annotation;
        }
    }
    return null;
}
RSS feed
Powered by Drupal