You are here

public function IndexedReader::getClassAnnotations in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php \Doctrine\Common\Annotations\IndexedReader::getClassAnnotations()

Gets the annotations applied to a class.

Parameters

\ReflectionClass $class The ReflectionClass of the class from which: the class annotations should be read.

Return value

array An array of Annotations.

Overrides Reader::getClassAnnotations

File

modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/IndexedReader.php, line 47

Class

IndexedReader
Allows the reader to be used in-place of Doctrine's reader.

Namespace

Doctrine\Common\Annotations

Code

public function getClassAnnotations(\ReflectionClass $class) {
  $annotations = array();
  foreach ($this->delegate
    ->getClassAnnotations($class) as $annot) {
    $annotations[get_class($annot)] = $annot;
  }
  return $annotations;
}