summaryrefslogtreecommitdiff
path: root/inc/lib/Twig/Node/SandboxedPrint.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/lib/Twig/Node/SandboxedPrint.php')
-rw-r--r--inc/lib/Twig/Node/SandboxedPrint.php20
1 files changed, 6 insertions, 14 deletions
diff --git a/inc/lib/Twig/Node/SandboxedPrint.php b/inc/lib/Twig/Node/SandboxedPrint.php
index 73dfaa96..a08f21f5 100644
--- a/inc/lib/Twig/Node/SandboxedPrint.php
+++ b/inc/lib/Twig/Node/SandboxedPrint.php
@@ -3,7 +3,7 @@
/*
* This file is part of Twig.
*
- * (c) 2010 Fabien Potencier
+ * (c) Fabien Potencier
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -21,21 +21,11 @@
*/
class Twig_Node_SandboxedPrint extends Twig_Node_Print
{
- public function __construct(Twig_Node_Expression $expr, $lineno, $tag = null)
- {
- parent::__construct($expr, $lineno, $tag);
- }
-
- /**
- * Compiles the node to PHP.
- *
- * @param Twig_Compiler A Twig_Compiler instance
- */
public function compile(Twig_Compiler $compiler)
{
$compiler
->addDebugInfo($this)
- ->write('echo $this->env->getExtension(\'sandbox\')->ensureToStringAllowed(')
+ ->write('echo $this->env->getExtension(\'Twig_Extension_Sandbox\')->ensureToStringAllowed(')
->subcompile($this->getNode('expr'))
->raw(");\n")
;
@@ -46,9 +36,9 @@ class Twig_Node_SandboxedPrint extends Twig_Node_Print
*
* This is mostly needed when another visitor adds filters (like the escaper one).
*
- * @param Twig_Node $node A Node
+ * @return Twig_Node
*/
- protected function removeNodeFilter($node)
+ protected function removeNodeFilter(Twig_Node $node)
{
if ($node instanceof Twig_Node_Expression_Filter) {
return $this->removeNodeFilter($node->getNode('node'));
@@ -57,3 +47,5 @@ class Twig_Node_SandboxedPrint extends Twig_Node_Print
return $node;
}
}
+
+class_alias('Twig_Node_SandboxedPrint', 'Twig\Node\SandboxedPrintNode', false);