package | Default |
---|
getDateFormat(): array
array
The default date format string and the default date interval format string
getEscapers(): array
array
An array of escapers
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>
getNumberFormat(): array
array
The arguments for number_format()
getOperators(): \Twig\Extension\array<array>
\Twig\Extension\array
First array of unary operators, second array of binary operators
getTests(): array<mixed,\Twig\TwigTest>
getTimezone(): \DateTimeZone
\DateTimeZone
The default timezone currently in use
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
setDateFormat(string $format = null,string $dateIntervalFormat = null)
string
The default date format string
string
The default date interval format string
setEscaper(string $strategy,callable $callable)
string
The strategy name that should be used as a strategy in the escape call
callable
A valid PHP callable
setNumberFormat(integer $decimal,string $decimalPoint,string $thousandSep)
integer
the number of decimal places to use
string
the character(s) to use for the decimal point
string
the character(s) to use for the thousands separator
setTimezone(\DateTimeZone|string $timezone)
\DateTimeZone|string
The default timezone string or a \DateTimeZone object
dateFormats :
numberFormat :
timezone :
escapers :