public function DocParser::addNamespace

Sets the default namespaces.

Parameters

array $namespace:

Throws

\RuntimeException

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Annotations/DocParser.php, line 243

Class

DocParser
A parser for docblock annotations.

Namespace

Doctrine\Common\Annotations

Code

public function addNamespace($namespace) {
  if ($this->imports) {
    throw new \RuntimeException('You must either use addNamespace(), or setImports(), but not both.');
  }
  $this->namespaces[] = $namespace;
}