function TokenParser::parseNamespace
Gets the namespace.
Return value
string The found namespace.
2 calls to TokenParser::parseNamespace()
- TokenParser::parseClass in core/
lib/ Drupal/ Component/ Annotation/ Doctrine/ TokenParser.php - Gets the class name.
- TokenParser::parseUseStatements in core/
lib/ Drupal/ Component/ Annotation/ Doctrine/ TokenParser.php - Gets all use statements.
File
-
core/
lib/ Drupal/ Component/ Annotation/ Doctrine/ TokenParser.php, line 201
Class
- TokenParser
- Parses a file for namespaces/use/class declarations.
Namespace
Drupal\Component\Annotation\DoctrineCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.