function AnnotationReader::getImports
Retrieves imports for a class or a function.
Parameters
ReflectionClass|ReflectionFunction $reflection:
Return value
array<string, class-string>
4 calls to AnnotationReader::getImports()
- AnnotationReader::getClassAnnotations in vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ AnnotationReader.php - Gets the annotations applied to a class.
- AnnotationReader::getFunctionAnnotations in vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ AnnotationReader.php - Gets the annotations applied to a function.
- AnnotationReader::getMethodImports in vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ AnnotationReader.php - Retrieves imports for methods.
- AnnotationReader::getPropertyImports in vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ AnnotationReader.php - Retrieves imports for properties.
File
-
vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ AnnotationReader.php, line 295
Class
- AnnotationReader
- A reader for docblock annotations.
Namespace
Doctrine\Common\AnnotationsCode
private function getImports($reflection) : array {
$type = $reflection instanceof ReflectionClass ? 'class' : 'function';
$name = $reflection->getName();
if (isset($this->imports[$type][$name])) {
return $this->imports[$type][$name];
}
$this->collectParsingMetadata($reflection);
return $this->imports[$type][$name];
}