27        $hash = spl_object_hash($node);
 
   28        if (!isset($this->
data[$hash])) {
 
   32        foreach ($this->
data[$hash] as $bucket) {
 
   33            if ($bucket[
'key'] !== $node) {
 
   37            if (in_array(
'html_attr', $bucket[
'value'])) {
 
   38                $bucket[
'value'][] = 
'html';
 
   41            return $bucket[
'value'];
 
   47        $hash = spl_object_hash($node);
 
   48        if (isset($this->
data[$hash])) {
 
   49            foreach ($this->
data[$hash] as &$bucket) {
 
   50                if ($bucket[
'key'] === $node) {
 
   51                    $bucket[
'value'] = $safe;
 
   57        $this->
data[$hash][] = array(
 
   72            $this->
setSafe($node, array(
'all'));
 
   75            $this->
setSafe($node, array(
'all'));
 
   78            $this->
setSafe($node, array(
'all'));
 
   86            $args = $node->
getNode(
'arguments');
 
   87            if (
false !== $filter = 
$env->getFilter(
$name)) {
 
   88                $safe = $filter->getSafe($args);
 
   99            $args = $node->
getNode(
'arguments');
 
  101            if (
false !== $function) {
 
  102                $this->
setSafe($node, $function->getSafe($args));
 
  104                $this->
setSafe($node, array());
 
  108                $this->
setSafe($node, array(
'all'));
 
  110                $this->
setSafe($node, array());
 
  115            if (
'_self' == 
$name || in_array(
$name, $this->safeVars)) {
 
  116                $this->
setSafe($node, array(
'all'));
 
  118                $this->
setSafe($node, array());
 
  121            $this->
setSafe($node, array());
 
  129        if (
null === $a || 
null === $b) {
 
  133        if (in_array(
'all', $a)) {
 
  137        if (in_array(
'all', $b)) {
 
  141        return array_intersect($a, $b);
 
  150class_alias(
'Twig_NodeVisitor_SafeAnalysis', 
'Twig\NodeVisitor\SafeAnalysisNodeVisitor', 
false);
 
An exception for terminatinating execution or to throw for unit testing.
Twig_BaseNodeVisitor can be used to make node visitors compatible with Twig 1.x and 2....
Stores the Twig configuration.
doEnterNode(Twig_Node $node, Twig_Environment $env)
Called before child nodes are visited.
getPriority()
Returns the priority for this visitor.
getSafe(Twig_NodeInterface $node)
setSafe(Twig_NodeInterface $node, array $safe)
doLeaveNode(Twig_Node $node, Twig_Environment $env)
Called after child nodes are visited.
intersectSafe(array $a=null, array $b=null)
Represents a block call node.
Represents a parent node.
Represents a node in the AST.
Represents a node in the AST.