mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 11:27:00 +00:00
removed obsolete code
This commit is contained in:
@@ -51,12 +51,6 @@ class Twig_Extension_Escaper extends Twig_Extension
|
||||
*/
|
||||
public function setDefaultStrategy($defaultStrategy)
|
||||
{
|
||||
if ('filename' === $defaultStrategy) {
|
||||
@trigger_error('Using "filename" as the default strategy is deprecated since version 1.27. Use "name" instead.', E_USER_DEPRECATED);
|
||||
|
||||
$defaultStrategy = 'name';
|
||||
}
|
||||
|
||||
if ('name' === $defaultStrategy) {
|
||||
$defaultStrategy = array('Twig_FileExtensionEscapingStrategy', 'guess');
|
||||
}
|
||||
|
||||
@@ -213,24 +213,4 @@ class Twig_Node implements Countable, IteratorAggregate
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 1.27 (to be removed in 2.0)
|
||||
*/
|
||||
public function setFilename($name)
|
||||
{
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use setName() instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->setName($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 1.27 (to be removed in 2.0)
|
||||
*/
|
||||
public function getFilename()
|
||||
{
|
||||
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getName() instead.', E_USER_DEPRECATED);
|
||||
|
||||
return $this->name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,8 +22,6 @@ class Twig_Node_Embed extends Twig_Node_Include
|
||||
parent::__construct(new Twig_Node_Expression_Constant('not_used', $lineno), $variables, $only, $ignoreMissing, $lineno, $tag);
|
||||
|
||||
$this->setAttribute('name', $name);
|
||||
// to be removed in 2.0, used name instead
|
||||
$this->setAttribute('filename', $name);
|
||||
$this->setAttribute('index', $index);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,10 +44,6 @@ class Twig_Node_Module extends Twig_Node
|
||||
|
||||
// embedded templates are set as attributes so that they are only visited once by the visitors
|
||||
parent::__construct($nodes, array(
|
||||
// source to be remove in 2.0
|
||||
'source' => $this->source->getCode(),
|
||||
// filename to be remove in 2.0 (use getName() instead)
|
||||
'filename' => $this->source->getName(),
|
||||
'index' => null,
|
||||
'embedded_templates' => $embeddedTemplates,
|
||||
), 1);
|
||||
|
||||
Reference in New Issue
Block a user