function AnnotationReader::collectParsingMetadata
Collects parsing metadata for a given class or function.
Parameters
ReflectionClass|ReflectionFunction $reflection:
2 calls to AnnotationReader::collectParsingMetadata()
- AnnotationReader::getIgnoredAnnotationNames in vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ AnnotationReader.php - Returns the ignored annotations for the given class or function.
- AnnotationReader::getImports in vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ AnnotationReader.php - Retrieves imports for a class or a function.
File
-
vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ AnnotationReader.php, line 363
Class
- AnnotationReader
- A reader for docblock annotations.
Namespace
Doctrine\Common\AnnotationsCode
private function collectParsingMetadata($reflection) : void {
$type = $reflection instanceof ReflectionClass ? 'class' : 'function';
$name = $reflection->getName();
$ignoredAnnotationNames = self::$globalIgnoredNames;
$annotations = $this->preParser
->parse($reflection->getDocComment(), $type . ' ' . $name);
foreach ($annotations as $annotation) {
if (!$annotation instanceof IgnoreAnnotation) {
continue;
}
foreach ($annotation->names as $annot) {
$ignoredAnnotationNames[$annot] = true;
}
}
$this->imports[$type][$name] = array_merge(self::$globalImports, $this->phpParser
->parseUseStatements($reflection), [
'__NAMESPACE__' => $reflection->getNamespaceName(),
'self' => $name,
]);
$this->ignoredAnnotationNames[$type][$name] = $ignoredAnnotationNames;
}