From e24646093011d3268cec3cf5deeb3e9f44a5c9e2 Mon Sep 17 00:00:00 2001 From: fabien Date: Tue, 22 Dec 2009 13:30:41 +0000 Subject: [PATCH] added __toString() to AutoEscape node class git-svn-id: http://svn.twig-project.org/trunk@200 93ef8e89-cb99-4229-a87c-7fa0fa45744b --- lib/Twig/Node/AutoEscape.php | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/lib/Twig/Node/AutoEscape.php b/lib/Twig/Node/AutoEscape.php index 5eefbd9..97c6e6d 100644 --- a/lib/Twig/Node/AutoEscape.php +++ b/lib/Twig/Node/AutoEscape.php @@ -30,7 +30,14 @@ class Twig_Node_AutoEscape extends Twig_Node implements Twig_NodeListInterface public function __toString() { - return get_class($this).'('.$this->value.')'; + $repr = array(get_class($this).'('.($this->value ? 'on' : 'off')); + foreach (explode("\n", $this->body) as $line) + { + $repr[] = ' '.$line; + } + $repr[] = ')'; + + return implode("\n", $repr); } public function getNodes() -- 1.7.2.5