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

Breadcrumb

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

function PsrCachedReader::getClassAnnotations

Overrides Reader::getClassAnnotations

1 call to PsrCachedReader::getClassAnnotations()
PsrCachedReader::getClassAnnotation in vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php
Gets a class annotation.

File

vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php, line 50

Class

PsrCachedReader
A cache aware annotation reader.

Namespace

Doctrine\Common\Annotations

Code

public function getClassAnnotations(ReflectionClass $class) {
    $cacheKey = $class->getName();
    if (isset($this->loadedAnnotations[$cacheKey])) {
        return $this->loadedAnnotations[$cacheKey];
    }
    $annots = $this->fetchFromCache($cacheKey, $class, 'getClassAnnotations', $class);
    return $this->loadedAnnotations[$cacheKey] = $annots;
}
RSS feed
Powered by Drupal