public function AnnotationReader::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 AnnotationReader::getPropertyAnnotations()
AnnotationReader::getPropertyAnnotation in drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationReader.php
Gets a property annotation.

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationReader.php, line 182

Class

AnnotationReader
A reader for docblock annotations.

Namespace

Doctrine\Common\Annotations

Code

public function getPropertyAnnotations(ReflectionProperty $property) {
  $class = $property
    ->getDeclaringClass();
  $context = 'property ' . $class
    ->getName() . "::\$" . $property
    ->getName();
  $this->parser
    ->setTarget(Target::TARGET_PROPERTY);
  $this->parser
    ->setImports($this
    ->getImports($class));
  $this->parser
    ->setIgnoredAnnotationNames($this
    ->getIgnoredAnnotationNames($class));
  return $this->parser
    ->parse($property
    ->getDocComment(), $context);
}