fixed Twig_Node_Expression_Array
authorfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Fri, 8 Jan 2010 14:58:41 +0000 (14:58 +0000)
committerfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Fri, 8 Jan 2010 14:58:41 +0000 (14:58 +0000)
git-svn-id: http://svn.twig-project.org/trunk@217 93ef8e89-cb99-4229-a87c-7fa0fa45744b

lib/Twig/Node/Expression/Array.php
lib/Twig/Node/Module.php

index dc4970d..14cc49d 100644 (file)
@@ -8,13 +8,14 @@
  * For the full copyright and license information, please view the LICENSE
  * file that was distributed with this source code.
  */
-class Twig_Node_Expression_Array extends Twig_Node_Expression
+class Twig_Node_Expression_Array extends Twig_Node_Expression implements Twig_NodeListInterface
 {
   protected $elements;
 
   public function __construct($elements, $lineno)
   {
     parent::__construct($lineno);
+
     $this->elements = $elements;
   }
 
@@ -33,6 +34,16 @@ class Twig_Node_Expression_Array extends Twig_Node_Expression
     return implode("\n", $repr);
   }
 
+  public function getNodes()
+  {
+    return $this->elements;
+  }
+
+  public function setNodes(array $nodes)
+  {
+    $this->elements = $nodes;
+  }
+
   public function compile($compiler)
   {
     $compiler->raw('array(');
index 3d2274f..eec2d12 100644 (file)
@@ -63,6 +63,11 @@ class Twig_Node_Module extends Twig_Node implements Twig_NodeListInterface
     return implode("\n", $repr);
   }
 
+  public function getFilename()
+  {
+    return $this->filename;
+  }
+
   public function getBody()
   {
     return $this->body;