39 $this->sandboxed =
true;
44 $this->sandboxed =
false;
70 $this->policy->checkSecurity(
$tags, $filters, $functions);
77 $this->policy->checkMethodAllowed($obj, $method);
84 $this->policy->checkPropertyAllowed($obj, $method);
91 $this->policy->checkMethodAllowed($obj,
'__toString');
103 class_alias(
'Twig_Extension_Sandbox',
'Twig\Extension\SandboxExtension',
false);
setSecurityPolicy(Twig_Sandbox_SecurityPolicyInterface $policy)
getName()
Returns the name of the extension.
__construct(Twig_Sandbox_SecurityPolicyInterface $policy, $sandboxed=false)
getTokenParsers()
Returns the token parser instances to add to the existing list.
ensureToStringAllowed($obj)
Interfaces that all security policy classes must implements.
checkPropertyAllowed($obj, $method)
Create styles array
The data for the language used.
getNodeVisitors()
Returns the node visitor instances to add to the existing list.
Marks a section of a template as untrusted code that must be evaluated in the sandbox mode...
checkSecurity($tags, $filters, $functions)
checkMethodAllowed($obj, $method)
Twig_NodeVisitor_Sandbox implements sandboxing.