public function SimpleAnnotationReader::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/SimpleAnnotationReader.php, line 147

Class

SimpleAnnotationReader
Simple Annotation Reader.

Namespace

Doctrine\Common\Annotations

Code

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