mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 19:36:43 +00:00
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:
@@ -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")
|
||||
|
||||
@@ -34,4 +34,6 @@ abstract class Twig_Template extends Twig_Resource implements Twig_TemplateInter
|
||||
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
abstract protected function getName();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user