private function DocParser::ArrayEntry in Service Container 7.2
Same name and namespace in other branches
- 7 modules/providers/service_container_annotation_discovery/lib/Doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php \Doctrine\Common\Annotations\DocParser::ArrayEntry()
ArrayEntry ::= Value | KeyValuePair KeyValuePair ::= Key ("=" | ":") PlainValue | Constant Key ::= string | integer | Constant
Return value
array
1 call to DocParser::ArrayEntry()
- DocParser::Arrayx in modules/
providers/ service_container_annotation_discovery/ lib/ Doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ DocParser.php - Array ::= "{" ArrayEntry {"," ArrayEntry}* [","] "}"
File
- modules/
providers/ service_container_annotation_discovery/ lib/ Doctrine/ annotations/ lib/ Doctrine/ Common/ Annotations/ DocParser.php, line 1117
Class
- DocParser
- A parser for docblock annotations.
Namespace
Doctrine\Common\AnnotationsCode
private function ArrayEntry() {
$peek = $this->lexer
->glimpse();
if (DocLexer::T_EQUALS === $peek['type'] || DocLexer::T_COLON === $peek['type']) {
if ($this->lexer
->isNextToken(DocLexer::T_IDENTIFIER)) {
$key = $this
->Constant();
}
else {
$this
->matchAny(array(
DocLexer::T_INTEGER,
DocLexer::T_STRING,
));
$key = $this->lexer->token['value'];
}
$this
->matchAny(array(
DocLexer::T_EQUALS,
DocLexer::T_COLON,
));
return array(
$key,
$this
->PlainValue(),
);
}
return array(
null,
$this
->Value(),
);
}