Internal class.
This class is used by \Twig\Environment as a staging area and must not be used directly.
author | Fabien Potencier fabien@symfony.com |
---|---|
internal | |
package | Default |
addFilter( $name, $filter)
addFunction( $name, $function)
addGlobal( $name, $value)
addNodeVisitor(\Twig\NodeVisitor\NodeVisitorInterface $visitor)
addTest( $name, $test)
addTokenParser(\Twig\TokenParser\TokenParserInterface $parser)
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
functions :
filters :
visitors :
tokenParsers :
globals :
tests :