From 4f5b44bd3bd490309eb2ba7b44df4769816ba729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sat, 3 Aug 2013 19:26:54 +0200 Subject: twig implementation --- inc/3rdparty/Twig/Node/SandboxedPrint.php | 59 ------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 inc/3rdparty/Twig/Node/SandboxedPrint.php (limited to 'inc/3rdparty/Twig/Node/SandboxedPrint.php') diff --git a/inc/3rdparty/Twig/Node/SandboxedPrint.php b/inc/3rdparty/Twig/Node/SandboxedPrint.php deleted file mode 100644 index 73dfaa96..00000000 --- a/inc/3rdparty/Twig/Node/SandboxedPrint.php +++ /dev/null @@ -1,59 +0,0 @@ - - */ -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(') - ->subcompile($this->getNode('expr')) - ->raw(");\n") - ; - } - - /** - * Removes node filters. - * - * This is mostly needed when another visitor adds filters (like the escaper one). - * - * @param Twig_Node $node A Node - */ - protected function removeNodeFilter($node) - { - if ($node instanceof Twig_Node_Expression_Filter) { - return $this->removeNodeFilter($node->getNode('node')); - } - - return $node; - } -} -- cgit v1.2.3