16 parent::__construct(array(
'node' => $node,
'attribute' => $attribute,
'arguments' => $arguments), array(
'type' => $type,
'is_defined_test' =>
false,
'ignore_strict_check' =>
false,
'disable_c_ext' =>
false),
$lineno);
21 if (function_exists(
'twig_template_get_attributes') && !$this->
getAttribute(
'disable_c_ext')) {
22 $compiler->
raw(
'twig_template_get_attributes($this, ');
24 $compiler->
raw(
'$this->getAttribute(');
28 $this->
getNode(
'node')->setAttribute(
'ignore_strict_check',
true);
33 $compiler->
raw(
', ')->subcompile($this->
getNode(
'attribute'));
36 $compiler->
raw(
', ')->subcompile($this->
getNode(
'arguments'));
43 $compiler->
raw(
', '.($this->
getAttribute(
'is_defined_test') ?
'true' :
'false'));
47 $compiler->
raw(
', '.($this->
getAttribute(
'ignore_strict_check') ?
'true' :
'false'));
Compiles a node to PHP code.
compile(Twig_Compiler $compiler)
Compiles the node to PHP.
getAttribute($name)
Gets an attribute.
Abstract class for all nodes that represents an expression.
subcompile(Twig_NodeInterface $node, $raw=true)
raw($string)
Adds a raw string to the compiled code.
__construct(Twig_Node_Expression $node, Twig_Node_Expression $attribute, Twig_Node_Expression_Array $arguments, $type, $lineno)
getNode($name)
Gets a node by name.