final | |
---|---|
package | Default |
__construct(string|false|callable $defaultStrategy = 'html')
see | \Twig\Extension\EscaperExtension::setDefaultStrategy() |
---|---|
string|false|callable
An escaping strategy
getDefaultStrategy(string $name): string|false
string
The template name
string|false
The default strategy to use for the template
getFilters(): array<mixed,\Twig\TwigFilter>
getFunctions(): array<mixed,\Twig\TwigFunction>
getGlobals(): array
deprecated | since 1.23 (to be removed in 2.0), implement \Twig_Extension_GlobalsInterface instead |
---|---|
array
An array of global variables
getName(): string
deprecated | since 1.26 (to be removed in 2.0), not used anymore internally |
---|---|
string
The extension name
getNodeVisitors(): array<mixed,\Twig\NodeVisitor\NodeVisitorInterface>
getOperators(): \Twig\Extension\array<array>
\Twig\Extension\array
First array of unary operators, second array of binary operators
getTests(): array<mixed,\Twig\TwigTest>
getTokenParsers(): array<mixed,\Twig\TokenParser\TokenParserInterface>
initRuntime(\Twig\Environment $environment)
This is where you can load some file that contains filter functions for instance.
deprecated | since 1.23 (to be removed in 2.0), implement \Twig_Extension_InitRuntimeInterface instead |
---|---|
\Twig\Environment
setDefaultStrategy(string|false|callable $defaultStrategy)
The strategy can be a valid PHP callback that takes the template name as an argument and returns the strategy to use.
string|false|callable
An escaping strategy
defaultStrategy :