public function CachedReader::getClassAnnotations

Get annotations for class

Parameters

\ReflectionClass $class:

Return value

array

Overrides Reader::getClassAnnotations

1 call to CachedReader::getClassAnnotations()
CachedReader::getClassAnnotation in drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/CachedReader.php
Get selected annotation for class

File

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

Class

CachedReader
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];
  }
  if (false === ($annots = $this
    ->fetchFromCache($cacheKey, $class))) {
    $annots = $this->delegate
      ->getClassAnnotations($class);
    $this
      ->saveToCache($cacheKey, $annots);
  }
  return $this->loadedAnnotations[$cacheKey] = $annots;
}