private function parseQualifiedNameRaw()
{
// Reset namespace prefix flag
$this->namespacePrefixReplaced = false;
// Consume comments and fetch first token type
$this->consumeComments();
$tokenType = $this->tokenizer->peek();
$qualifiedName = array();
if ($tokenType === Tokens::T_NAMESPACE) {
// Consume namespace keyword
$this->consumeToken(Tokens::T_NAMESPACE);
$this->consumeComments();
// Add current namespace as first token
$qualifiedName = array((string) $this->namespaceName);
// Set prefixed flag to true
$this->namespacePrefixReplaced = true;
} elseif ($this->isClassName($tokenType)) {
$qualifiedName[] = $this->parseClassName();
$this->consumeComments();
$tokenType = $this->tokenizer->peek();
// Stop here for simple identifier
if ($tokenType !== Tokens::T_BACKSLASH) {
return $qualifiedName;
}
}
do {
// Next token must be a namespace separator
$this->consumeToken(Tokens::T_BACKSLASH);
$this->consumeComments();
// Append to qualified name
$qualifiedName[] = '\\';
$qualifiedName[] = $this->parseClassName();
$this->consumeComments();
// Get next token type
$tokenType = $this->tokenizer->peek();
} while ($tokenType === Tokens::T_BACKSLASH);
return $qualifiedName;
}