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

Breadcrumb

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

function NameContext::startNamespace

Start a new namespace.

This also resets the alias table.

Parameters

Name|null $namespace Null is the global namespace:

File

vendor/nikic/php-parser/lib/PhpParser/NameContext.php, line 38

Class

NameContext

Namespace

PhpParser

Code

public function startNamespace(?Name $namespace = null) : void {
    $this->namespace = $namespace;
    $this->origAliases = $this->aliases = [
        Stmt\Use_::TYPE_NORMAL => [],
        Stmt\Use_::TYPE_FUNCTION => [],
        Stmt\Use_::TYPE_CONSTANT => [],
    ];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal