function DocParser::setImports
Same name in this branch
- 11.1.x core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php \Drupal\Component\Annotation\Doctrine\DocParser::setImports()
Sets the imports.
Parameters
array<string, class-string> $imports:
Return value
void
Throws
RuntimeException
File
-
vendor/
doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ DocParser.php, line 331
Class
- DocParser
- A parser for docblock annotations.
Namespace
Doctrine\Common\AnnotationsCode
public function setImports(array $imports) {
if ($this->namespaces) {
throw new RuntimeException('You must either use addNamespace(), or setImports(), but not both.');
}
$this->imports = $imports;
}