function AnnotationReader::getPropertyImports
Retrieves imports for properties.
Return value
array<string, class-string>
1 call to AnnotationReader::getPropertyImports()
- AnnotationReader::getPropertyAnnotations in vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ AnnotationReader.php - Gets the annotations applied to a property.
File
-
vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ AnnotationReader.php, line 340
Class
- AnnotationReader
- A reader for docblock annotations.
Namespace
Doctrine\Common\AnnotationsCode
private function getPropertyImports(ReflectionProperty $property) {
$class = $property->getDeclaringClass();
$classImports = $this->getImports($class);
$traitImports = [];
foreach ($class->getTraits() as $trait) {
if (!$trait->hasProperty($property->getName())) {
continue;
}
$traitImports = array_merge($traitImports, $this->phpParser
->parseUseStatements($trait));
}
return array_merge($classImports, $traitImports);
}