You are here

public function TokenParser::parseNamespace 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/TokenParser.php \Doctrine\Common\Annotations\TokenParser::parseNamespace()

Gets the namespace.

Return value

string The found namespace.

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

File

modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/TokenParser.php, line 165

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)) {
    $name .= $token[1];
  }
  return $name;
}