ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Default parser implementation. More...
Public Member Functions | |
__construct (Twig_Environment $env) | |
getEnvironment () | |
getVarName () | |
getFilename () | |
parse (Twig_TokenStream $stream, $test=null, $dropNeedle=false) | |
subparse ($test, $dropNeedle=false) | |
addHandler ($name, $class) | |
addNodeVisitor (Twig_NodeVisitorInterface $visitor) | |
getBlockStack () | |
peekBlockStack () | |
popBlockStack () | |
pushBlockStack ($name) | |
hasBlock ($name) | |
getBlock ($name) | |
setBlock ($name, Twig_Node_Block $value) | |
hasMacro ($name) | |
setMacro ($name, Twig_Node_Macro $node) | |
isReservedMacroName ($name) | |
addTrait ($trait) | |
hasTraits () | |
embedTemplate (Twig_Node_Module $template) | |
addImportedSymbol ($type, $alias, $name=null, Twig_Node_Expression $node=null) | |
getImportedSymbol ($type, $alias) | |
isMainScope () | |
pushLocalScope () | |
popLocalScope () | |
getExpressionParser () | |
getParent () | |
setParent ($parent) | |
getStream () | |
getCurrentToken () | |
Public Member Functions inherited from Twig_ParserInterface | |
parse (Twig_TokenStream $stream) | |
Converts a token stream to a node tree. More... | |
Protected Member Functions | |
filterBodyNodes (Twig_NodeInterface $node) | |
Protected Attributes | |
$stack = array() | |
$stream | |
$parent | |
$handlers | |
$visitors | |
$expressionParser | |
$blocks | |
$blockStack | |
$macros | |
$env | |
$reservedMacroNames | |
$importedSymbols | |
$traits | |
$embeddedTemplates = array() | |
Private Attributes | |
$varNameSalt = 0 | |
Default parser implementation.
Definition at line 18 of file Parser.php.
Twig_Parser::__construct | ( | Twig_Environment | $env | ) |
Definition at line 36 of file Parser.php.
References $env.
Twig_Parser::addHandler | ( | $name, | |
$class | |||
) |
Definition at line 213 of file Parser.php.
References $name.
Twig_Parser::addImportedSymbol | ( | $type, | |
$alias, | |||
$name = null , |
|||
Twig_Node_Expression | $node = null |
||
) |
Twig_Parser::addNodeVisitor | ( | Twig_NodeVisitorInterface | $visitor | ) |
Definition at line 223 of file Parser.php.
Twig_Parser::addTrait | ( | $trait | ) |
Definition at line 296 of file Parser.php.
Twig_Parser::embedTemplate | ( | Twig_Node_Module | $template | ) |
Definition at line 306 of file Parser.php.
References $template, and Twig_Node_Module\setIndex().
|
protected |
Definition at line 376 of file Parser.php.
References $n.
Referenced by parse().
Twig_Parser::getBlock | ( | $name | ) |
Twig_Parser::getBlockStack | ( | ) |
Twig_Parser::getCurrentToken | ( | ) |
Definition at line 371 of file Parser.php.
Referenced by subparse().
Twig_Parser::getEnvironment | ( | ) |
Definition at line 44 of file Parser.php.
References $env.
Referenced by Twig_ExpressionParser\__construct().
Twig_Parser::getExpressionParser | ( | ) |
Definition at line 345 of file Parser.php.
References $expressionParser.
Twig_Parser::getFilename | ( | ) |
Use $parser->getStream()->getSourceContext()->getPath() instead.
Definition at line 59 of file Parser.php.
Twig_Parser::getImportedSymbol | ( | $type, | |
$alias | |||
) |
Twig_Parser::getParent | ( | ) |
Definition at line 350 of file Parser.php.
References $parent.
Twig_Parser::getStream | ( | ) |
Twig_Parser::getVarName | ( | ) |
Definition at line 51 of file Parser.php.
References GuzzleHttp\Psr7\hash().
Twig_Parser::hasBlock | ( | $name | ) |
Twig_Parser::hasMacro | ( | $name | ) |
Twig_Parser::hasTraits | ( | ) |
Definition at line 301 of file Parser.php.
Twig_Parser::isMainScope | ( | ) |
Definition at line 327 of file Parser.php.
Twig_Parser::isReservedMacroName | ( | $name | ) |
Definition at line 279 of file Parser.php.
References $name, $r, and array.
Referenced by setMacro().
Twig_Parser::parse | ( | Twig_TokenStream | $stream, |
$test = null , |
|||
$dropNeedle = false |
|||
) |
Definition at line 66 of file Parser.php.
References $key, $stream, $test, array, filterBodyNodes(), Twig_TokenStream\getSourceContext(), Twig_Error\getSourceContext(), Twig_Error\getTemplateLine(), Twig_Error\setSourceContext(), Twig_Error\setTemplateLine(), and subparse().
Twig_Parser::peekBlockStack | ( | ) |
Definition at line 235 of file Parser.php.
Twig_Parser::popBlockStack | ( | ) |
Definition at line 240 of file Parser.php.
Twig_Parser::popLocalScope | ( | ) |
Definition at line 337 of file Parser.php.
Twig_Parser::pushBlockStack | ( | $name | ) |
Twig_Parser::pushLocalScope | ( | ) |
Twig_Parser::setBlock | ( | $name, | |
Twig_Node_Block | $value | ||
) |
Definition at line 260 of file Parser.php.
References $name, array, and Twig_Node\getTemplateLine().
Twig_Parser::setMacro | ( | $name, | |
Twig_Node_Macro | $node | ||
) |
Definition at line 270 of file Parser.php.
References $name, Twig_Node\getTemplateLine(), and isReservedMacroName().
Twig_Parser::setParent | ( | $parent | ) |
Definition at line 355 of file Parser.php.
References $parent.
Twig_Parser::subparse | ( | $test, | |
$dropNeedle = false |
|||
) |
Definition at line 136 of file Parser.php.
References $test, Twig_Error_Syntax\addSuggestions(), Twig_Error\appendMessage(), array, Twig_Token\BLOCK_START_TYPE, getCurrentToken(), Twig_Token\NAME_TYPE, Twig_Token\TEXT_TYPE, Twig_Token\VAR_END_TYPE, and Twig_Token\VAR_START_TYPE.
Referenced by parse().
|
protected |
Definition at line 26 of file Parser.php.
|
protected |
Definition at line 27 of file Parser.php.
Referenced by getBlockStack().
|
protected |
Definition at line 33 of file Parser.php.
|
protected |
Definition at line 29 of file Parser.php.
Referenced by __construct(), and getEnvironment().
|
protected |
Definition at line 25 of file Parser.php.
Referenced by getExpressionParser().
|
protected |
Definition at line 23 of file Parser.php.
|
protected |
Definition at line 31 of file Parser.php.
|
protected |
Definition at line 28 of file Parser.php.
|
protected |
Definition at line 22 of file Parser.php.
Referenced by getParent(), and setParent().
|
protected |
Definition at line 30 of file Parser.php.
|
protected |
Definition at line 20 of file Parser.php.
|
protected |
Definition at line 21 of file Parser.php.
Referenced by getStream(), and parse().
|
protected |
Definition at line 32 of file Parser.php.
|
private |
Definition at line 34 of file Parser.php.
|
protected |
Definition at line 24 of file Parser.php.