Classes, interfaces and traits

NodeCaptureInterface

Represents a node that captures any nested displayable nodes.

« More »

NodeOutputInterface

Represents a displayable node in the AST.

« More »

AutoEscapeNode

Represents an autoescape node.

The value is the escaping strategy (can be html, js, ...)

The true value is equivalent to html.

If autoescaping is disabled, then the value is false.

« More »

BlockNode

Represents a block node.

« More »

BlockReferenceNode

Represents a block call node.

« More »

BodyNode

Represents a body node.

« More »

CheckSecurityCallNode

Represents a node in the AST.

« More »

CheckSecurityNode

Represents a node in the AST.

« More »

CheckToStringNode

Checks if casting an expression to __toString() is allowed by the sandbox.

For instance, when there is a simple Print statement, like {{ article }}, and if the sandbox is enabled, we need to check that the __toString() method is allowed if 'article' is an object. The same goes for {{ article|upper }} or {{ random(article) }}

« More »

DeprecatedNode

Represents a deprecated node.

« More »

DoNode

Represents a do node.

« More »

FlushNode

Represents a flush node.

« More »

ForLoopNode

Internal node used by the for node.

« More »

ImportNode

Represents an import node.

« More »

Node

Represents a node in the AST.

« More »

PrintNode

Represents a node that outputs an expression.

« More »

SandboxedPrintNode

Adds a check for the __toString() method when the variable is an object and the sandbox is activated.

When there is a simple Print statement, like {{ article }}, and if the sandbox is enabled, we need to check that the __toString() method is allowed if 'article' is an object.

Not used anymore, to be deprecated in 2.x and removed in 3.0

« More »

SandboxNode

Represents a sandbox node.

« More »

SetNode

Represents a set node.

« More »

SetTempNode

Represents a node in the AST.

« More »

SpacelessNode

Represents a spaceless node.

It removes spaces between HTML tags.

« More »

TextNode

Represents a text node.

« More »

Classes, interfaces and traits

AbstractExpression

Abstract class for all nodes that represents an expression.

« More »

ArrayExpression

Abstract class for all nodes that represents an expression.

« More »

ArrowFunctionExpression

Represents an arrow function.

« More »

AssignNameExpression

Abstract class for all nodes that represents an expression.

« More »

BlockReferenceExpression

Represents a block call node.

« More »

CallExpression

Abstract class for all nodes that represents an expression.

« More »

ConditionalExpression

Abstract class for all nodes that represents an expression.

« More »

ConstantExpression

Abstract class for all nodes that represents an expression.

« More »

FilterExpression

Abstract class for all nodes that represents an expression.

« More »

FunctionExpression

Abstract class for all nodes that represents an expression.

« More »

InlinePrint

Abstract class for all nodes that represents an expression.

« More »

MethodCallExpression

Abstract class for all nodes that represents an expression.

« More »

NameExpression

Abstract class for all nodes that represents an expression.

« More »

NullCoalesceExpression

Abstract class for all nodes that represents an expression.

« More »

ParentExpression

Represents a parent node.

« More »

TempNameExpression

Abstract class for all nodes that represents an expression.

« More »

Classes, interfaces and traits

ConstantTest

Checks if a variable is the exact same value as a constant.

{% if post.status is constant('Post::PUBLISHED') %} the status attribute is exactly the same as Post::PUBLISHED {% endif %}

« More »

DivisiblebyTest

Checks if a variable is divisible by a number.

{% if loop.index is divisible by(3) %}

« More »

EvenTest

Checks if a number is even.

{{ var is even }}

« More »

NullTest

Checks that a variable is null.

{{ var is none }}

« More »

OddTest

Checks if a number is odd.

{{ var is odd }}

« More »

SameasTest

Checks if a variable is the same as another one (=== in PHP).

« More »

Classes, interfaces and traits

AbstractUnary

Abstract class for all nodes that represents an expression.

« More »

NegUnary

Abstract class for all nodes that represents an expression.

« More »

NotUnary

Abstract class for all nodes that represents an expression.

« More »

PosUnary

Abstract class for all nodes that represents an expression.

« More »

Classes, interfaces and traits

AbstractBinary

Abstract class for all nodes that represents an expression.

« More »

AddBinary

Abstract class for all nodes that represents an expression.

« More »

AndBinary

Abstract class for all nodes that represents an expression.

« More »

BitwiseAndBinary

Abstract class for all nodes that represents an expression.

« More »

BitwiseOrBinary

Abstract class for all nodes that represents an expression.

« More »

BitwiseXorBinary

Abstract class for all nodes that represents an expression.

« More »

ConcatBinary

Abstract class for all nodes that represents an expression.

« More »

DivBinary

Abstract class for all nodes that represents an expression.

« More »

EndsWithBinary

Abstract class for all nodes that represents an expression.

« More »

EqualBinary

Abstract class for all nodes that represents an expression.

« More »

FloorDivBinary

Abstract class for all nodes that represents an expression.

« More »

GreaterBinary

Abstract class for all nodes that represents an expression.

« More »

GreaterEqualBinary

Abstract class for all nodes that represents an expression.

« More »

InBinary

Abstract class for all nodes that represents an expression.

« More »

LessBinary

Abstract class for all nodes that represents an expression.

« More »

LessEqualBinary

Abstract class for all nodes that represents an expression.

« More »

MatchesBinary

Abstract class for all nodes that represents an expression.

« More »

ModBinary

Abstract class for all nodes that represents an expression.

« More »

MulBinary

Abstract class for all nodes that represents an expression.

« More »

NotEqualBinary

Abstract class for all nodes that represents an expression.

« More »

NotInBinary

Abstract class for all nodes that represents an expression.

« More »

OrBinary

Abstract class for all nodes that represents an expression.

« More »

PowerBinary

Abstract class for all nodes that represents an expression.

« More »

RangeBinary

Abstract class for all nodes that represents an expression.

« More »

StartsWithBinary

Abstract class for all nodes that represents an expression.

« More »

SubBinary

Abstract class for all nodes that represents an expression.

« More »

Classes, interfaces and traits

DefaultFilter

Returns the value or the default value when it is undefined or empty.

{{ var.foo|default('foo item on var is not defined') }}

« More »