public function CachedReader::getClassAnnotation

Get selected annotation for class

Parameters

\ReflectionClass $class:

string $annotationName:

Return value

null

Overrides Reader::getClassAnnotation

File

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

Class

CachedReader
A cache aware annotation reader.

Namespace

Doctrine\Common\Annotations

Code

public function getClassAnnotation(\ReflectionClass $class, $annotationName) {
  foreach ($this
    ->getClassAnnotations($class) as $annot) {
    if ($annot instanceof $annotationName) {
      return $annot;
    }
  }
  return null;
}