public function CachedReader::getMethodAnnotations in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/CachedReader.php \Doctrine\Common\Annotations\CachedReader::getMethodAnnotations()
Gets the annotations applied to a method.
Parameters
\ReflectionMethod $method The ReflectionMethod of the method from which: the annotations should be read.
Return value
array An array of Annotations.
Overrides Reader::getMethodAnnotations
1 call to CachedReader::getMethodAnnotations()
- CachedReader::getMethodAnnotation in vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ CachedReader.php - Gets a method annotation.
File
- vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ CachedReader.php, line 141
Class
- CachedReader
- A cache aware annotation reader.
Namespace
Doctrine\Common\AnnotationsCode
public function getMethodAnnotations(\ReflectionMethod $method) {
$class = $method
->getDeclaringClass();
$cacheKey = $class
->getName() . '#' . $method
->getName();
if (isset($this->loadedAnnotations[$cacheKey])) {
return $this->loadedAnnotations[$cacheKey];
}
if (false === ($annots = $this
->fetchFromCache($cacheKey, $class))) {
$annots = $this->delegate
->getMethodAnnotations($method);
$this
->saveToCache($cacheKey, $annots);
}
return $this->loadedAnnotations[$cacheKey] = $annots;
}