public function CachedReader::getPropertyAnnotations 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::getPropertyAnnotations()
Gets the annotations applied to a property.
Parameters
\ReflectionProperty $property The ReflectionProperty of the property: from which the annotations should be read.
Return value
array An array of Annotations.
Overrides Reader::getPropertyAnnotations
1 call to CachedReader::getPropertyAnnotations()
- CachedReader::getPropertyAnnotation in vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ CachedReader.php - Gets a property annotation.
File
- vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ CachedReader.php, line 107
Class
- CachedReader
- A cache aware annotation reader.
Namespace
Doctrine\Common\AnnotationsCode
public function getPropertyAnnotations(\ReflectionProperty $property) {
$class = $property
->getDeclaringClass();
$cacheKey = $class
->getName() . '$' . $property
->getName();
if (isset($this->loadedAnnotations[$cacheKey])) {
return $this->loadedAnnotations[$cacheKey];
}
if (false === ($annots = $this
->fetchFromCache($cacheKey, $class))) {
$annots = $this->delegate
->getPropertyAnnotations($property);
$this
->saveToCache($cacheKey, $annots);
}
return $this->loadedAnnotations[$cacheKey] = $annots;
}