Browse code

fixed Twig_Node_Expression_Array

git-svn-id: http://svn.twig-project.org/trunk@217 93ef8e89-cb99-4229-a87c-7fa0fa45744b

fabien authored on 08/01/2010 14:58:41
Showing 2 changed files
... ...
@@ -8,13 +8,14 @@
8 8
  * For the full copyright and license information, please view the LICENSE
9 9
  * file that was distributed with this source code.
10 10
  */
11
-class Twig_Node_Expression_Array extends Twig_Node_Expression
11
+class Twig_Node_Expression_Array extends Twig_Node_Expression implements Twig_NodeListInterface
12 12
 {
13 13
   protected $elements;
14 14
 
15 15
   public function __construct($elements, $lineno)
16 16
   {
17 17
     parent::__construct($lineno);
18
+
18 19
     $this->elements = $elements;
19 20
   }
20 21
 
... ...
@@ -33,6 +34,16 @@ class Twig_Node_Expression_Array extends Twig_Node_Expression
33 34
     return implode("\n", $repr);
34 35
   }
35 36
 
37
+  public function getNodes()
38
+  {
39
+    return $this->elements;
40
+  }
41
+
42
+  public function setNodes(array $nodes)
43
+  {
44
+    $this->elements = $nodes;
45
+  }
46
+
36 47
   public function compile($compiler)
37 48
   {
38 49
     $compiler->raw('array(');
... ...
@@ -63,6 +63,11 @@ class Twig_Node_Module extends Twig_Node implements Twig_NodeListInterface
63 63
     return implode("\n", $repr);
64 64
   }
65 65
 
66
+  public function getFilename()
67
+  {
68
+    return $this->filename;
69
+  }
70
+
66 71
   public function getBody()
67 72
   {
68 73
     return $this->body;