EscaperNodeVisitor

Extends\Twig\NodeVisitor\AbstractNodeVisitor

Used to make node visitors compatible with Twig 1.x and 2.x.

To be removed in Twig 3.1.

final
author

Fabien Potencier fabien@symfony.com

package

Default

Methods

__construct

__construct()

Called before child nodes are visited.

doEnterNode(\Twig\Node\Node $node,\Twig\Environment $env): \Twig\Node\Node
inheritedabstract

Arguments

$env

\Twig\Environment

Response

\Twig\Node\Node

The modified node

Called after child nodes are visited.

doLeaveNode(\Twig\Node\Node $node,\Twig\Environment $env): \Twig\Node\Node|false|null
inheritedabstract

Arguments

$env

\Twig\Environment

Response

\Twig\Node\Node|false|null

The modified node or null if the node must be removed

Called before child nodes are visited.

enterNode(\Twig_NodeInterface $node,\Twig\Environment $env): \Twig_NodeInterface
inheritedfinal

Arguments

$env

\Twig\Environment

Response

\Twig_NodeInterface

The modified node

escapeInlinePrintNode

escapeInlinePrintNode(\Twig\Node\Expression\InlinePrint $node,\Twig\Environment $env, $type)

Arguments

$env

\Twig\Environment

$type

escapePrintNode

escapePrintNode(\Twig\Node\PrintNode $node,\Twig\Environment $env, $type)

Arguments

$env

\Twig\Environment

$type

getEscaperFilter

getEscaperFilter( $type,\Twig_NodeInterface $node)

Arguments

$type

getPriority

getPriority()

isSafeFor

isSafeFor( $type,\Twig_NodeInterface $expression, $env)

Arguments

$type

$expression

\Twig_NodeInterface

$env

Called after child nodes are visited.

leaveNode(\Twig_NodeInterface $node,\Twig\Environment $env): \Twig_NodeInterface|false|null
inheritedfinal

Arguments

$env

\Twig\Environment

Response

\Twig_NodeInterface|false|null

The modified node or null if the node must be removed

needEscaping

needEscaping(\Twig\Environment $env)

Arguments

$env

\Twig\Environment

preEscapeFilterNode

preEscapeFilterNode(\Twig\Node\Expression\FilterExpression $filter,\Twig\Environment $env)

Arguments

$env

\Twig\Environment

shouldUnwrapConditional

shouldUnwrapConditional(\Twig\Node\Expression\ConditionalExpression $expression,\Twig\Environment $env, $type)

Arguments

$env

\Twig\Environment

$type

unwrapConditional

unwrapConditional(\Twig\Node\Expression\ConditionalExpression $expression,\Twig\Environment $env, $type)

Arguments

$env

\Twig\Environment

$type

Properties

statusStack

statusStack :

Type(s)

blocks

blocks :

Type(s)

safeAnalysis

safeAnalysis :

Type(s)

traverser

traverser :

Type(s)

defaultStrategy

defaultStrategy :

Type(s)

safeVars

safeVars :

Type(s)