123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
-
-
- class Twig_Node_Expression_Array extends Twig_Node_Expression
- {
- public function __construct(array $elements, $lineno)
- {
- parent::__construct($elements, array(), $lineno);
- }
-
-
-
- public function compile(Twig_Compiler $compiler)
- {
- $compiler->raw('array(');
- $first = true;
- foreach ($this->nodes as $name => $node) {
- if (!$first) {
- $compiler->raw(', ');
- }
- $first = false;
-
- $compiler
- ->repr($name)
- ->raw(' => ')
- ->subcompile($node)
- ;
- }
- $compiler->raw(')');
- }
- }
|