45 $this->sandboxed =
true;
50 $this->sandboxed =
false;
76 $this->policy->checkSecurity($tags, $filters, $functions);
83 $this->policy->checkMethodAllowed($obj, $method);
90 $this->policy->checkPropertyAllowed($obj, $method);
96 if (is_object($obj)) {
97 $this->policy->checkMethodAllowed($obj,
'__toString');
__construct(Twig_Sandbox_SecurityPolicyInterface $policy, $sandboxed=false)
getTokenParsers()
Returns the token parser instances to add to the existing list.
Marks a section of a template as untrusted code that must be evaluated in the sandbox mode...
Twig_NodeVisitor_Sandbox implements sandboxing.
getNodeVisitors()
Returns the node visitor instances to add to the existing list.
ensureToStringAllowed($obj)
checkSecurity($tags, $filters, $functions)
Interfaces that all security policy classes must implements.
getName()
Returns the name of the extension.
checkMethodAllowed($obj, $method)
setSecurityPolicy(Twig_Sandbox_SecurityPolicyInterface $policy)
checkPropertyAllowed($obj, $method)