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

Breadcrumb

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

function TokenParser::parseNamespace

Gets the namespace.

Return value

string The found namespace.

2 calls to TokenParser::parseNamespace()
TokenParser::parseClass in vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php
Gets the class name.
TokenParser::parseUseStatements in vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php
Gets all use statements.

File

vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php, line 178

Class

TokenParser
Parses a file for namespaces/use/class declarations.

Namespace

Doctrine\Common\Annotations

Code

public function parseNamespace() {
    $name = '';
    while (($token = $this->next()) && ($token[0] === T_STRING || $token[0] === T_NS_SEPARATOR || PHP_VERSION_ID >= 80000 && ($token[0] === T_NAME_QUALIFIED || $token[0] === T_NAME_FULLY_QUALIFIED))) {
        $name .= $token[1];
    }
    return $name;
}

API Navigation

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