You are here

public function AnnotationReader::getPropertyAnnotations in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_annotation_discovery/lib/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 modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php
Gets a property annotation.

File

modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php, line 216

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);
}