mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-16 04:16:28 +00:00
fixed Twig_Node_Expression_Array
git-svn-id: http://svn.twig-project.org/trunk@217 93ef8e89-cb99-4229-a87c-7fa0fa45744b
This commit is contained in:
@@ -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(');
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user