private function AnnotationReader::collectParsingMetadata

Collects parsing metadata for a given class

Parameters

ReflectionClass $class:

2 calls to AnnotationReader::collectParsingMetadata()
AnnotationReader::getIgnoredAnnotationNames in drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationReader.php
Returns the ignored annotations for the given class.
AnnotationReader::getImports in drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/AnnotationReader.php
Retrieve imports

File

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

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