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 44
__construct(array $tokens)
No description
at line 55
ExpressionNode
parseExpression()
Parses PHP-like expression.
at line 64
ArrayNode
parseArguments()
Parses optional list of arguments. Named and variadic arguments are also supported.
at line 73
ModifierNode
parseModifier()
Parses optional list of filters.
at line 84
ExpressionNode
parseUnquotedStringOrExpression(bool $colon = true)
Parses unquoted string or PHP-like expression.
at line 107
SuperiorTypeNode|null
parseType()
Parses optional type declaration.
at line 127
array
parseForeach()
internal |
Parses variables used in foreach.
at line 136
Token|null
tryConsumeTokenBeforeUnquotedString(string ...$kind)
Consumes optional token followed by whitespace. Suitable before parseUnquotedStringOrExpression().
at line 147
Token|null
tryConsumeModifier(string ...$kind)
deprecated
deprecated
No description
at line 153
bool
isEnd()
No description
at line 291
throwReservedKeywordException(Token $token)
No description
at line 297
protected ExpressionNode
checkFunctionName(FunctionCallableNode $func)
No description
at line 308
static protected IdentifierNode
handleBuiltinTypes(NameNode $name)
No description
at line 322
static protected IntegerNode
parseOffset(string $str, Position $position)
No description