\Twig\ExtensionEscaperExtension

Summary

Methods
Properties
Constants
__construct()
getTokenParsers()
getNodeVisitors()
getFilters()
setDefaultStrategy()
getDefaultStrategy()
getTests()
getFunctions()
getOperators()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$defaultStrategy
N/A

Properties

$defaultStrategy

$defaultStrategy : 

Type

Methods

__construct()

__construct(string|false|callable  $defaultStrategy = 'html') 

Parameters

string|false|callable $defaultStrategy

An escaping strategy

getTokenParsers()

getTokenParsers() : array<mixed,\Twig_TokenParserInterface>

Returns the token parser instances to add to the existing list.

Returns

array<mixed,\Twig_TokenParserInterface>

getNodeVisitors()

getNodeVisitors() : array<mixed,\Twig_NodeVisitorInterface>

Returns the node visitor instances to add to the existing list.

Returns

array<mixed,\Twig_NodeVisitorInterface>

getFilters()

getFilters() : array<mixed,\Twig_Filter>

Returns a list of filters to add to the existing list.

Returns

array<mixed,\Twig_Filter>

setDefaultStrategy()

setDefaultStrategy(string|false|callable  $defaultStrategy) 

Sets the default strategy to use when not defined by the user.

The strategy can be a valid PHP callback that takes the template name as an argument and returns the strategy to use.

Parameters

string|false|callable $defaultStrategy

An escaping strategy

getDefaultStrategy()

getDefaultStrategy(string  $name) : string|false

Gets the default strategy to use when not defined by the user.

Parameters

string $name

The template name

Returns

string|false —

The default strategy to use for the template

getTests()

getTests() : array<mixed,\Twig_Test>

Returns a list of tests to add to the existing list.

Returns

array<mixed,\Twig_Test>

getFunctions()

getFunctions() : array<mixed,\Twig_Function>

Returns a list of functions to add to the existing list.

Returns

array<mixed,\Twig_Function>

getOperators()

getOperators() : \array<array>

Returns a list of operators to add to the existing list.

Returns

\array

First array of unary operators, second array of binary operators