You are here

public function AnnotationReader::getPropertyAnnotations in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php \Doctrine\Common\Annotations\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 vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php
Gets a property annotation.

File

vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php, line 217

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
    ->getPropertyImports($property));
  $this->parser
    ->setIgnoredAnnotationNames($this
    ->getIgnoredAnnotationNames($class));
  return $this->parser
    ->parse($property
    ->getDocComment(), $context);
}