Browse code

added some methods to Twig_Node_Include to allow better introspection

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

fabien authored on 08/01/2010 14:59:14
Showing 1 changed files
... ...
@@ -37,6 +37,21 @@ class Twig_Node_Include extends Twig_Node
37 37
     return get_class($this).'('.$this->expr.')';
38 38
   }
39 39
 
40
+  public function getIncludedFile()
41
+  {
42
+    return $this->expr;
43
+  }
44
+
45
+  public function isSandboxed()
46
+  {
47
+    return $this->sandboxed;
48
+  }
49
+
50
+  public function getVariables()
51
+  {
52
+    return $this->variables;
53
+  }
54
+
40 55
   public function compile($compiler)
41 56
   {
42 57
     if (!$compiler->getEnvironment()->hasExtension('sandbox') && $this->sandboxed)