public function CachedReader::getPropertyAnnotation

Get selected annotation for property

Parameters

\ReflectionProperty $property:

string $annotationName:

Return value

null

Overrides Reader::getPropertyAnnotation

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/CachedReader.php, line 141

Class

CachedReader
A cache aware 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;
}