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

Breadcrumb

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

function PsrCachedReader::getMethodAnnotations

Overrides Reader::getMethodAnnotations

1 call to PsrCachedReader::getMethodAnnotations()
PsrCachedReader::getMethodAnnotation in vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PsrCachedReader.php
Gets a method annotation.

File

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

Class

PsrCachedReader
A cache aware annotation reader.

Namespace

Doctrine\Common\Annotations

Code

public function getMethodAnnotations(ReflectionMethod $method) {
    $class = $method->getDeclaringClass();
    $cacheKey = $class->getName() . '#' . $method->getName();
    if (isset($this->loadedAnnotations[$cacheKey])) {
        return $this->loadedAnnotations[$cacheKey];
    }
    $annots = $this->fetchFromCache($cacheKey, $class, 'getMethodAnnotations', $method);
    return $this->loadedAnnotations[$cacheKey] = $annots;
}
RSS feed
Powered by Drupal