public function DocParser::addNamespace in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_annotation_discovery/lib/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
- modules/
providers/ service_container_annotation_discovery/ lib/ Doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ DocParser.php, line 275
Class
- DocParser
- A parser for docblock annotations.
Namespace
Doctrine\Common\AnnotationsCode
public function addNamespace($namespace) {
if ($this->imports) {
throw new \RuntimeException('You must either use addNamespace(), or setImports(), but not both.');
}
$this->namespaces[] = $namespace;
}