removed getName() method in Twig_Template

This commit is contained in:
Fabien Potencier
2010-06-12 15:43:21 +02:00
parent cb34e7cb97
commit 57f2853320
4 changed files with 0 additions and 43 deletions
-15
View File
@@ -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
-2
View File
@@ -61,6 +61,4 @@ abstract class Twig_Template extends Twig_Resource implements Twig_TemplateInter
return ob_get_clean();
}
abstract protected function getName();
}
-16
View File
@@ -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);