22 $this->index = $pair[
'key']->getAttribute(
'value');
31 foreach (array_chunk($this->nodes, 2) as $pair) {
46 if ((
string) $key === (
string) $pair[
'key']) {
60 array_push($this->nodes,
$key, $value);
65 $compiler->
raw(
'array(');
76 ->subcompile($pair[
'value'])
83 class_alias(
'Twig_Node_Expression_Array',
'Twig\Node\Expression\ArrayExpression',
false);
raw($string)
Adds a raw string to the compiled code.
addElement(Twig_Node_Expression $value, Twig_Node_Expression $key=null)
compile(Twig_Compiler $compiler)
Compiles the node to PHP.
subcompile(Twig_NodeInterface $node, $raw=true)
hasElement(Twig_Node_Expression $key)
Abstract class for all nodes that represents an expression.
Create styles array
The data for the language used.
__construct(array $elements, $lineno)