You are here

public function DocParser::setImports in Service Container 7.2

Same name and namespace in other branches
  1. 7 modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php \Doctrine\Common\Annotations\DocParser::setImports()

Sets the imports.

Parameters

array $imports:

Return value

void

Throws

\RuntimeException

File

modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php, line 293

Class

DocParser
A parser for docblock annotations.

Namespace

Doctrine\Common\Annotations

Code

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