Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DocParser.php

function DocParser::addNamespace

Same name in this branch
  1. 11.1.x core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php \Drupal\Component\Annotation\Doctrine\DocParser::addNamespace()

Sets the default namespaces.

Return value

void

Throws

RuntimeException

File

vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php, line 313

Class

DocParser
A parser for docblock annotations.

Namespace

Doctrine\Common\Annotations

Code

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