ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Represents a node in the AST. More...
Public Member Functions | |
__construct (array $nodes=array(), array $attributes=array(), $lineno=0, $tag=null) | |
Constructor. More... | |
__toString () | |
toXml ($asDom=false) | |
compile (Twig_Compiler $compiler) | |
Compiles the node to PHP. More... | |
getTemplateLine () | |
getLine () | |
getNodeTag () | |
hasAttribute ($name) | |
getAttribute ($name) | |
setAttribute ($name, $value) | |
removeAttribute ($name) | |
hasNode ($name) | |
getNode ($name) | |
setNode ($name, $node=null) | |
removeNode ($name) | |
count () | |
getIterator () | |
setTemplateName ($name) | |
getTemplateName () | |
setFilename ($name) | |
getFilename () | |
Protected Attributes | |
$nodes | |
$attributes | |
$lineno | |
$tag | |
Private Attributes | |
$name | |
Twig_Node::__construct | ( | array | $nodes = array() , |
array | $attributes = array() , |
||
$lineno = 0 , |
|||
$tag = null |
|||
) |
Constructor.
The nodes are automatically made available as properties ($this->node). The attributes are automatically made available as array items ($this['name']).
array | $nodes | An array of named nodes |
array | $attributes | An array of attributes (should not be nodes) |
int | $lineno | The line number |
string | $tag | The tag name associated with the Node |
Definition at line 38 of file Node.php.
References $attributes, $lineno, $name, $nodes, and $tag.
Twig_Node::__toString | ( | ) |
Definition at line 51 of file Node.php.
References $attributes, $name, and count().
Twig_Node::compile | ( | Twig_Compiler | $compiler | ) |
Compiles the node to PHP.
Implements Twig_NodeInterface.
Definition at line 114 of file Node.php.
Referenced by Twig_Node_Expression_Call\compileCallable().
Twig_Node::count | ( | ) |
Definition at line 209 of file Node.php.
Referenced by Twig_Node_Expression_Filter_Default\__construct(), __toString(), Twig_Node_If\compile(), Twig_Node_Macro\compile(), Twig_Node_Set\compile(), Twig_Node_Module\compileConstructor(), Twig_Node_Module\compileIsTraitable(), Twig_Extensions_Node_Trans\compileString(), Twig_Node_Module\compileTemplate(), and Twig_Node_Expression_Call\getArguments().
Twig_Node::getAttribute | ( | $name | ) |
Definition at line 152 of file Node.php.
References $name.
Referenced by Twig_Node_Expression_Array\__construct(), Twig_Node_Set\__construct(), Twig_Node_Expression_Filter_Default\__construct(), Twig_Node_Embed\addGetTemplate(), Twig_Node_Include\addTemplateArguments(), Twig_Node_Expression_AssignName\compile(), Twig_Node_Expression_Function\compile(), Twig_Node_Expression_TempName\compile(), Twig_Node_Expression_Constant\compile(), Twig_Node_SetTemp\compile(), Twig_Node_Expression_MethodCall\compile(), Twig_Node_Expression_Test\compile(), Twig_Node_ForLoop\compile(), Twig_Node_Import\compile(), Twig_Profiler_Node_EnterProfile\compile(), Twig_Profiler_Node_LeaveProfile\compile(), Twig_Node_Expression_GetAttr\compile(), Twig_Node_Expression_Name\compile(), Twig_Node_Block\compile(), Twig_Node_BlockReference\compile(), Twig_Node_Text\compile(), Twig_Node_Expression_Parent\compile(), Twig_Node_Expression_ExtensionReference\compile(), Twig_Node_With\compile(), Twig_Node_Include\compile(), Twig_Node_Macro\compile(), Twig_Node_For\compile(), Twig_Extensions_Node_Trans\compile(), Twig_Node_Expression_BlockReference\compile(), Twig_Node_Set\compile(), Twig_Node_Module\compile(), Twig_Node_Expression_Call\compileArguments(), Twig_Node_Expression_Call\compileCallable(), Twig_Node_Module\compileClassHeader(), Twig_Extensions_Node_Trans\compileString(), Twig_Node_Module\compileTemplate(), Twig_NodeVisitor_Sandbox\doEnterNode(), Twig_NodeVisitor_Escaper\doEnterNode(), Twig_Profiler_NodeVisitor_Profiler\doLeaveNode(), Twig_NodeVisitor_Escaper\doLeaveNode(), Twig_NodeVisitor_SafeAnalysis\doLeaveNode(), Twig_Node_Expression_Call\getArguments(), Twig_Node_Expression_Call\getCallableParameters(), Twig_Node_Expression_Name\isSimple(), Twig_Node_Expression_Name\isSpecial(), and Twig_TokenParser_For\parse().
Twig_Node::getFilename | ( | ) |
Definition at line 247 of file Node.php.
References $name.
Twig_Node::getIterator | ( | ) |
Twig_Node::getLine | ( | ) |
Implements Twig_NodeInterface.
Definition at line 129 of file Node.php.
References $lineno.
Twig_Node::getNode | ( | $name | ) |
Definition at line 186 of file Node.php.
References $name.
Referenced by Twig_Node_Set\__construct(), Twig_Node_Include\addGetTemplate(), Twig_Node_Include\addTemplateArguments(), Twig_Node_Expression_Test_Defined\changeIgnoreStrictCheck(), Twig_Extensions_TokenParser_Trans\checkTransString(), Twig_Node_Expression_Binary_Power\compile(), Twig_Node_Expression_Binary_StartsWith\compile(), Twig_Node_Expression_Binary_Range\compile(), Twig_Node_Expression_Binary_EndsWith\compile(), Twig_Node_Expression_Binary_In\compile(), Twig_Node_Expression_Binary_Matches\compile(), Twig_Node_Expression_Binary_NotIn\compile(), Twig_Node_Expression_Filter\compile(), Twig_Node_Expression_Conditional\compile(), Twig_Node_Expression_Test_Sameas\compile(), Twig_Node_Expression_Unary\compile(), Twig_Node_Expression_Binary\compile(), Twig_Node_Expression_MethodCall\compile(), Twig_Node_Expression_Test_Null\compile(), Twig_Node_Expression_Test_Divisibleby\compile(), Twig_Node_Expression_Test_Even\compile(), Twig_Node_Expression_Test_Odd\compile(), Twig_Node_Expression_GetAttr\compile(), Twig_Node_Expression_NullCoalesce\compile(), Twig_Node_Sandbox\compile(), Twig_Node_Do\compile(), Twig_Node_Import\compile(), Twig_Node_SandboxedPrint\compile(), Twig_Node_Expression_Test_Constant\compile(), Twig_Node_Print\compile(), Twig_Node_Block\compile(), Twig_Node_Spaceless\compile(), Twig_Node_With\compile(), Twig_Node_AutoEscape\compile(), Twig_Node_If\compile(), Twig_Node_Macro\compile(), Twig_Extensions_Node_Trans\compile(), Twig_Node_For\compile(), Twig_Node_Expression_Filter_Default\compile(), Twig_Node_Set\compile(), Twig_Node_Expression_Test_Defined\compile(), Twig_Node_Expression_Call\compileArguments(), Twig_Node_Expression_BlockReference\compileBlockArguments(), Twig_Node_Module\compileClassFooter(), Twig_Node_Module\compileConstructor(), Twig_Node_Module\compileDisplay(), Twig_Node_Module\compileGetParent(), Twig_Node_Module\compileIsTraitable(), Twig_Node_Module\compileMacros(), Twig_Node_Module\compileTemplate(), Twig_Node_Expression_BlockReference\compileTemplateCall(), Twig_NodeVisitor_Sandbox\doEnterNode(), Twig_NodeVisitor_Escaper\doEnterNode(), Twig_Profiler_NodeVisitor_Profiler\doLeaveNode(), Twig_NodeVisitor_Sandbox\doLeaveNode(), Twig_NodeVisitor_SafeAnalysis\doLeaveNode(), Twig_NodeVisitor_Escaper\escapePrintNode(), Twig_TokenParser_For\parse(), Twig_NodeVisitor_Escaper\preEscapeFilterNode(), and Twig_Node_SandboxedPrint\removeNodeFilter().
Twig_Node::getNodeTag | ( | ) |
Implements Twig_NodeInterface.
Definition at line 136 of file Node.php.
References $tag.
Referenced by Twig_NodeVisitor_Sandbox\doEnterNode().
Twig_Node::getTemplateLine | ( | ) |
Definition at line 121 of file Node.php.
References $lineno.
Referenced by Twig_Node_Expression_NullCoalesce\__construct(), Twig_Node_Expression_Filter_Default\__construct(), Twig_Node_Expression_Test_Defined\__construct(), Twig_Node_Expression_Array\addElement(), Twig_Node_Embed\addGetTemplate(), Twig_Node_Include\addGetTemplate(), Twig_Node_Import\compile(), Twig_Extensions_Node_Trans\compileString(), Twig_Node_Expression_BlockReference\compileTemplateCall(), Twig_NodeVisitor_Sandbox\doEnterNode(), Twig_NodeVisitor_Optimizer\doLeaveNode(), Twig_NodeVisitor_Escaper\escapePrintNode(), Twig_TokenParser_For\parse(), Twig_Parser\setBlock(), and Twig_Parser\setMacro().
Twig_Node::getTemplateName | ( | ) |
Definition at line 229 of file Node.php.
References $name.
Referenced by Twig_Node_Embed\addGetTemplate(), Twig_Node_Include\addGetTemplate(), Twig_Node_Import\compile(), Twig_Node_Expression_BlockReference\compileTemplateCall(), Twig_NodeVisitor_Escaper\doEnterNode(), and Twig_Profiler_NodeVisitor_Profiler\doLeaveNode().
Twig_Node::hasAttribute | ( | $name | ) |
Definition at line 144 of file Node.php.
References $name.
Referenced by Twig_Node_Expression_Call\compileArguments(), Twig_Node_Expression_Call\compileCallable(), Twig_Node_Expression_Call\getArguments(), and Twig_Node_Expression_Call\getCallableParameters().
Twig_Node::hasNode | ( | $name | ) |
Definition at line 178 of file Node.php.
References $name.
Referenced by Twig_Node_Include\addTemplateArguments(), Twig_Node_Expression_GetAttr\compile(), Twig_Node_Expression_Test_Constant\compile(), Twig_Node_With\compile(), Twig_Node_If\compile(), Twig_Node_For\compile(), Twig_Extensions_Node_Trans\compile(), Twig_Node_Expression_Call\compileArguments(), Twig_Node_Expression_BlockReference\compileBlockArguments(), Twig_Node_Module\compileConstructor(), Twig_Node_Module\compileDisplay(), Twig_Node_Module\compileGetParent(), Twig_Node_Module\compileIsTraitable(), Twig_Node_Module\compileTemplate(), Twig_Node_Expression_BlockReference\compileTemplateCall(), and Twig_Node_Expression_Call\getCallableParameters().
Twig_Node::setAttribute | ( | $name, | |
$value | |||
) |
string | $name | |
mixed | $value |
Definition at line 165 of file Node.php.
References $name.
Referenced by Twig_Node_Expression_MethodCall\__construct(), Twig_Node_Set\__construct(), Twig_Node_Embed\__construct(), Twig_Node_Expression_Test_Defined\changeIgnoreStrictCheck(), Twig_Node_Expression_Function\compile(), Twig_Node_Expression_Filter\compile(), Twig_Node_Expression_Test\compile(), and Twig_Node_Module\setIndex().
Twig_Node::setFilename | ( | $name | ) |
Definition at line 237 of file Node.php.
References $name, and setTemplateName().
Twig_Node::setNode | ( | $name, | |
$node = null |
|||
) |
Definition at line 195 of file Node.php.
References $name.
Referenced by Twig_Node_Set\__construct(), Twig_Profiler_NodeVisitor_Profiler\doLeaveNode(), Twig_NodeVisitor_Sandbox\doLeaveNode(), and Twig_NodeVisitor_Escaper\preEscapeFilterNode().
Twig_Node::setTemplateName | ( | $name | ) |
Definition at line 219 of file Node.php.
References $name.
Referenced by Twig_Node_Module\__construct(), and setFilename().
Twig_Node::toXml | ( | $asDom = false | ) |
|
protected |
Definition at line 21 of file Node.php.
Referenced by __construct(), and __toString().
|
protected |
Definition at line 22 of file Node.php.
Referenced by Twig_Node_Expression_Function\__construct(), Twig_Node_Expression_MethodCall\__construct(), Twig_Node_Expression_NullCoalesce\__construct(), Twig_Node_Expression_TempName\__construct(), Twig_Node_Expression_Test\__construct(), Twig_Node_Expression_Binary\__construct(), Twig_Node_Expression_Conditional\__construct(), Twig_Node_Expression_GetAttr\__construct(), Twig_Node_Expression_Filter\__construct(), Twig_Node_Expression_Constant\__construct(), Twig_Node_Expression_Unary\__construct(), Twig_Node_Expression_Array\__construct(), Twig_Node_SetTemp\__construct(), Twig_Node_ForLoop\__construct(), Twig_Node_Import\__construct(), Twig_Node_Do\__construct(), Twig_Node_Set\__construct(), Twig_Node_With\__construct(), Twig_Extensions_Node_Trans\__construct(), Twig_Node_Sandbox\__construct(), Twig_Node_Flush\__construct(), Twig_Node_Expression_Parent\__construct(), Twig_Node_Block\__construct(), Twig_Node_Print\__construct(), Twig_Node_Expression_Name\__construct(), Twig_Node_Include\__construct(), Twig_Node_Embed\__construct(), Twig_Node_If\__construct(), Twig_Node_Text\__construct(), Twig_Node_BlockReference\__construct(), Twig_Node_Macro\__construct(), Twig_Node_Spaceless\__construct(), Twig_Node_For\__construct(), Twig_Node_Expression_ExtensionReference\__construct(), Twig_Node_Expression_Filter_Default\__construct(), Twig_Node_Expression_BlockReference\__construct(), Twig_Node_AutoEscape\__construct(), Twig_Node_Expression_Test_Defined\__construct(), __construct(), getLine(), and getTemplateLine().
|
private |
Definition at line 25 of file Node.php.
Referenced by Twig_Node_Expression_Function\__construct(), Twig_Node_Expression_Test\__construct(), Twig_Node_Expression_TempName\__construct(), Twig_Node_SetTemp\__construct(), Twig_Profiler_Node_EnterProfile\__construct(), Twig_Node_Expression_Name\__construct(), Twig_Node_Block\__construct(), Twig_Node_Embed\__construct(), Twig_Node_BlockReference\__construct(), Twig_Node_Expression_Parent\__construct(), Twig_Node_Macro\__construct(), Twig_Node_Expression_ExtensionReference\__construct(), Twig_Node_Expression_Test_Defined\__construct(), Twig_Node_Module\__construct(), __construct(), __toString(), Twig_Node_Expression_Function\compile(), Twig_Node_Expression_Filter\compile(), Twig_Node_SetTemp\compile(), Twig_Node_Expression_Test\compile(), Twig_Node_Expression_Name\compile(), Twig_Node_CheckSecurity\compile(), Twig_Node_Macro\compile(), Twig_Node_Module\compileConstructor(), Twig_Node_Expression_Call\getArguments(), getAttribute(), getFilename(), getNode(), getTemplateName(), hasAttribute(), hasNode(), Twig_Node_Expression_Call\normalizeName(), removeAttribute(), removeNode(), setAttribute(), setFilename(), setNode(), setTemplateName(), and toXml().
|
protected |
Definition at line 20 of file Node.php.
Referenced by Twig_Node_Expression_Test\__construct(), Twig_Node_Expression_GetAttr\__construct(), Twig_Node_With\__construct(), Twig_Extensions_Node_Trans\__construct(), Twig_Node_If\__construct(), Twig_Node_Include\__construct(), Twig_Node_For\__construct(), Twig_Node_Expression_BlockReference\__construct(), Twig_Node_Module\__construct(), __construct(), and Twig_Node_Module\compileIsTraitable().
|
protected |
Definition at line 23 of file Node.php.
Referenced by Twig_Node_Expression_Filter\__construct(), Twig_Extensions_Node_Trans\__construct(), Twig_Node_ForLoop\__construct(), Twig_Node_Import\__construct(), Twig_Node_Do\__construct(), Twig_Node_Set\__construct(), Twig_Node_Sandbox\__construct(), Twig_Node_With\__construct(), Twig_Node_Flush\__construct(), Twig_Node_Block\__construct(), Twig_Node_If\__construct(), Twig_Node_BlockReference\__construct(), Twig_Node_Include\__construct(), Twig_Node_Print\__construct(), Twig_Node_Embed\__construct(), Twig_Node_Expression_Parent\__construct(), Twig_Node_Macro\__construct(), Twig_Node_Spaceless\__construct(), Twig_Node_For\__construct(), Twig_Node_Expression_BlockReference\__construct(), Twig_Node_Expression_ExtensionReference\__construct(), Twig_Node_Expression_Filter_Default\__construct(), Twig_Node_AutoEscape\__construct(), __construct(), and getNodeTag().