28 ->write(
"\$sandbox = \$this->env->getExtension('Twig_Extension_Sandbox');\n")
29 ->write(
"if (!\$alreadySandboxed = \$sandbox->isSandboxed()) {\n")
31 ->write(
"\$sandbox->enableSandbox();\n")
34 ->subcompile($this->
getNode(
'body'))
35 ->write(
"if (!\$alreadySandboxed) {\n")
37 ->write(
"\$sandbox->disableSandbox();\n")
44 class_alias(
'Twig_Node_Sandbox',
'Twig\Node\SandboxNode',
false);
Represents a node in the AST.
Represents a node in the AST.
Represents a sandbox node.
compile(Twig_Compiler $compiler)
Compiles the node to PHP.
Create styles array
The data for the language used.
__construct(Twig_NodeInterface $body, $lineno, $tag=null)
addDebugInfo(Twig_NodeInterface $node)
Adds debugging information.