added a getName() method in the default Template abstract class

git-svn-id: http://svn.twig-project.org/trunk@223 93ef8e89-cb99-4229-a87c-7fa0fa45744b
This commit is contained in:
fabien
2010-01-08 16:14:59 +00:00
parent 58c7e55ce4
commit 2c2b10097b
2 changed files with 13 additions and 0 deletions
+11
View File
@@ -202,6 +202,17 @@ class Twig_Node_Module extends Twig_Node implements Twig_NodeListInterface
;
}
// original template name
$compiler
->write("public function getName()\n", "{\n")
->indent()
->write('return ')
->string($this->filename)
->raw(";\n")
->outdent()
->write("}\n\n")
;
$compiler
->outdent()
->write("}\n")
+2
View File
@@ -34,4 +34,6 @@ abstract class Twig_Template extends Twig_Resource implements Twig_TemplateInter
return ob_get_clean();
}
abstract protected function getName();
}