public function FileCacheReader::getPropertyAnnotation

Gets a property annotation.

Parameters

\ReflectionProperty $property:

string $annotationName The name of the annotation.:

Return value

mixed The Annotation or NULL, if the requested annotation does not exist.

Overrides Reader::getPropertyAnnotation

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/FileCacheReader.php, line 238

Class

FileCacheReader
File cache reader for annotations.

Namespace

Doctrine\Common\Annotations

Code

public function getPropertyAnnotation(\ReflectionProperty $property, $annotationName) {
  $annotations = $this
    ->getPropertyAnnotations($property);
  foreach ($annotations as $annotation) {
    if ($annotation instanceof $annotationName) {
      return $annotation;
    }
  }
  return null;
}