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