function DocParser::PlainValue
Same name in other branches
- 8.9.x core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php \Drupal\Component\Annotation\Doctrine\DocParser::PlainValue()
- 10 core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php \Drupal\Component\Annotation\Doctrine\DocParser::PlainValue()
- 11.x core/lib/Drupal/Component/Annotation/Doctrine/DocParser.php \Drupal\Component\Annotation\Doctrine\DocParser::PlainValue()
PlainValue ::= integer | string | float | boolean | Array | Annotation
Return value
mixed
3 calls to DocParser::PlainValue()
- DocParser::ArrayEntry in core/
lib/ Drupal/ Component/ Annotation/ Doctrine/ DocParser.php - ArrayEntry ::= Value | KeyValuePair KeyValuePair ::= Key ("=" | ":") PlainValue | Constant Key ::= string | integer | Constant
- DocParser::FieldAssignment in core/
lib/ Drupal/ Component/ Annotation/ Doctrine/ DocParser.php - FieldAssignment ::= FieldName "=" PlainValue FieldName ::= identifier
- DocParser::Value in core/
lib/ Drupal/ Component/ Annotation/ Doctrine/ DocParser.php - Value ::= PlainValue | FieldAssignment
File
-
core/
lib/ Drupal/ Component/ Annotation/ Doctrine/ DocParser.php, line 1004
Class
- DocParser
- A parser for docblock annotations.
Namespace
Drupal\Component\Annotation\DoctrineCode
private function PlainValue() {
if ($this->lexer
->isNextToken(DocLexer::T_OPEN_CURLY_BRACES)) {
return $this->Arrayx();
}
if ($this->lexer
->isNextToken(DocLexer::T_AT)) {
return $this->Annotation();
}
if ($this->lexer
->isNextToken(DocLexer::T_IDENTIFIER)) {
return $this->Constant();
}
switch ($this->lexer->lookahead['type']) {
case DocLexer::T_STRING:
$this->match(DocLexer::T_STRING);
return $this->lexer->token['value'];
case DocLexer::T_INTEGER:
$this->match(DocLexer::T_INTEGER);
return (int) $this->lexer->token['value'];
case DocLexer::T_FLOAT:
$this->match(DocLexer::T_FLOAT);
return (double) $this->lexer->token['value'];
case DocLexer::T_TRUE:
$this->match(DocLexer::T_TRUE);
return true;
case DocLexer::T_FALSE:
$this->match(DocLexer::T_FALSE);
return false;
case DocLexer::T_NULL:
$this->match(DocLexer::T_NULL);
return null;
default:
$this->syntaxError('PlainValue');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.