21 parent::__construct(array(
'body' => $body), array(),
$lineno,
$tag);
33 ->write(
"\$sandbox = \$this->env->getExtension('sandbox');\n")
34 ->write(
"if (!\$alreadySandboxed = \$sandbox->isSandboxed()) {\n")
36 ->write(
"\$sandbox->enableSandbox();\n")
39 ->subcompile($this->
getNode(
'body'))
40 ->write(
"if (!\$alreadySandboxed) {\n")
42 ->write(
"\$sandbox->disableSandbox();\n")
Compiles a node to PHP code.
Represents a node in the AST.
addDebugInfo(Twig_NodeInterface $node)
Adds debugging information.
Represents a sandbox node.
__construct(Twig_NodeInterface $body, $lineno, $tag=null)
Represents a node in the AST.
compile(Twig_Compiler $compiler)
Compiles the node to PHP.
getNode($name)
Gets a node by name.