function SimpleAnnotationReader::getPropertyAnnotation

File

core/lib/Drupal/Component/Annotation/Doctrine/SimpleAnnotationReader.php, line 151

Class

SimpleAnnotationReader
Simple Annotation Reader.

Namespace

Drupal\Component\Annotation\Doctrine

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.