TagParser
final class TagParser extends TagParserData
Parser for PHP-like expression language used in tags.
Based on works by Nikita Popov, Moriyoshi Koizumi and Masato Bito.
Constants
| private SchemaExpression |
|
| private SchemaArguments |
|
| private SchemaFilters |
|
| private SchemaForeach |
|
| private SymbolNone |
|
Properties
| $stream | |||
| $text | |||
| protected ArrayNode> | $shortArrays |
Methods
No description
Parses PHP-like expression.
Parses optional list of arguments. Named and variadic arguments are also supported.
Parses optional list of filters.
Parses unquoted string or PHP-like expression.
Parses optional type declaration.
Parses variables used in foreach.
Consumes optional token followed by whitespace. Suitable before parseUnquotedStringOrExpression().
No description
No description
No description
Details
at line 42
__construct(array $tokens)
No description
at line 53
ExpressionNode
parseExpression()
Parses PHP-like expression.
at line 62
ArrayNode
parseArguments()
Parses optional list of arguments. Named and variadic arguments are also supported.
at line 71
ModifierNode
parseModifier()
Parses optional list of filters.
at line 82
ExpressionNode
parseUnquotedStringOrExpression(bool $colon = true)
Parses unquoted string or PHP-like expression.
at line 105
SuperiorTypeNode|null
parseType()
Parses optional type declaration.
at line 125
array
parseForeach()
| internal |
Parses variables used in foreach.
at line 134
Token|null
tryConsumeTokenBeforeUnquotedString(string ...$kind)
Consumes optional token followed by whitespace. Suitable before parseUnquotedStringOrExpression().
at line 145
Token|null
tryConsumeModifier(string ...$kind)
deprecated
deprecated
No description
at line 151
bool
isEnd()
No description
at line 289
throwReservedKeywordException(Token $token)
No description
at line 295
protected ExpressionNode
checkFunctionName(FunctionCallableNode $func)
No description
at line 306
static protected IdentifierNode
handleBuiltinTypes(NameNode $name)
No description
at line 320
static protected IntegerNode
parseOffset(string $str, Position $position)
No description