added some methods to Twig_Node_Include to allow better introspection
authorfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Fri, 8 Jan 2010 14:59:14 +0000 (14:59 +0000)
committerfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Fri, 8 Jan 2010 14:59:14 +0000 (14:59 +0000)
git-svn-id: http://svn.twig-project.org/trunk@218 93ef8e89-cb99-4229-a87c-7fa0fa45744b

lib/Twig/Node/Include.php

index 45b62df..d32e69b 100644 (file)
@@ -37,6 +37,21 @@ class Twig_Node_Include extends Twig_Node
     return get_class($this).'('.$this->expr.')';
   }
 
+  public function getIncludedFile()
+  {
+    return $this->expr;
+  }
+
+  public function isSandboxed()
+  {
+    return $this->sandboxed;
+  }
+
+  public function getVariables()
+  {
+    return $this->variables;
+  }
+
   public function compile($compiler)
   {
     if (!$compiler->getEnvironment()->hasExtension('sandbox') && $this->sandboxed)