mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 20:06:31 +00:00
removed getName() method in Twig_Template
This commit is contained in:
@@ -50,8 +50,6 @@ class Twig_Node_Module extends Twig_Node
|
||||
|
||||
$compiler->subcompile($this->blocks);
|
||||
|
||||
$this->compileGetName($compiler);
|
||||
|
||||
$this->compileMacros($compiler);
|
||||
|
||||
$this->compileClassFooter($compiler);
|
||||
@@ -152,19 +150,6 @@ class Twig_Node_Module extends Twig_Node
|
||||
;
|
||||
}
|
||||
|
||||
protected function compileGetName($compiler)
|
||||
{
|
||||
$compiler
|
||||
->write("public function getName()\n", "{\n")
|
||||
->indent()
|
||||
->write('return ')
|
||||
->string($this['filename'])
|
||||
->raw(";\n")
|
||||
->outdent()
|
||||
->write("}\n\n")
|
||||
;
|
||||
}
|
||||
|
||||
protected function compileDisplayFooter($compiler)
|
||||
{
|
||||
$compiler
|
||||
|
||||
@@ -61,6 +61,4 @@ abstract class Twig_Template extends Twig_Resource implements Twig_TemplateInter
|
||||
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
abstract protected function getName();
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ class Twig_Tests_Node_ModuleTest extends Twig_Tests_Node_TestCase
|
||||
* @covers Twig_Node_Module::compileDisplayHeader
|
||||
* @covers Twig_Node_Module::compileDisplayBody
|
||||
* @covers Twig_Node_Module::compileDisplayFooter
|
||||
* @covers Twig_Node_Module::compileGetName
|
||||
* @covers Twig_Node_Module::compileClassFooter
|
||||
* @dataProvider getTests
|
||||
*/
|
||||
@@ -73,11 +72,6 @@ class __TwigTemplate_be925a7b06dda0dfdbd18a1509f7eb34 extends Twig_Template
|
||||
echo "foo";
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return "foo.twig";
|
||||
}
|
||||
|
||||
}
|
||||
EOF
|
||||
, $twig);
|
||||
@@ -106,11 +100,6 @@ class __TwigTemplate_be925a7b06dda0dfdbd18a1509f7eb34 extends Twig_Template
|
||||
\$this->parent->display(\$context);
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return "foo.twig";
|
||||
}
|
||||
|
||||
}
|
||||
EOF
|
||||
, $twig);
|
||||
@@ -144,11 +133,6 @@ class __TwigTemplate_be925a7b06dda0dfdbd18a1509f7eb34 extends Twig_Template
|
||||
\$this->parent->display(\$context);
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return "foo.twig";
|
||||
}
|
||||
|
||||
}
|
||||
EOF
|
||||
, $twig);
|
||||
|
||||
@@ -78,11 +78,6 @@ class __TwigTemplate_be925a7b06dda0dfdbd18a1509f7eb34 extends Twig_Template
|
||||
);
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return "foo.twig";
|
||||
}
|
||||
|
||||
}
|
||||
EOF
|
||||
, $twig);
|
||||
@@ -122,11 +117,6 @@ class __TwigTemplate_be925a7b06dda0dfdbd18a1509f7eb34 extends Twig_Template
|
||||
\$this->parent->checkSecurity();
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return "foo.twig";
|
||||
}
|
||||
|
||||
}
|
||||
EOF
|
||||
, $twig);
|
||||
|
||||
Reference in New Issue
Block a user