You are here

private function AnnotationReader::collectParsingMetadata 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::collectParsingMetadata()

Collects parsing metadata for a given class.

Parameters

\ReflectionClass $class:

2 calls to AnnotationReader::collectParsingMetadata()
AnnotationReader::getClassImports in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php
Retrieves imports.
AnnotationReader::getIgnoredAnnotationNames in modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php
Returns the ignored annotations for the given class.

File

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

Class

AnnotationReader
A reader for docblock annotations.

Namespace

Doctrine\Common\Annotations

Code

private function collectParsingMetadata(ReflectionClass $class) {
  $ignoredAnnotationNames = self::$globalIgnoredNames;
  $annotations = $this->preParser
    ->parse($class
    ->getDocComment(), 'class ' . $class->name);
  foreach ($annotations as $annotation) {
    if ($annotation instanceof IgnoreAnnotation) {
      foreach ($annotation->names as $annot) {
        $ignoredAnnotationNames[$annot] = true;
      }
    }
  }
  $name = $class
    ->getName();
  $this->imports[$name] = array_merge(self::$globalImports, $this->phpParser
    ->parseClass($class), array(
    '__NAMESPACE__' => $class
      ->getNamespaceName(),
  ));
  $this->ignoredAnnotationNames[$name] = $ignoredAnnotationNames;
}