class Twig_Extension_Core extends Twig_Extension
Methods
|
initRuntime(Twig_Environment $environment)
Initializes the runtime environment. |
from Twig_Extension | |
| array |
getTokenParsers()
Returns the token parser instance to add to the existing list. |
|
| array |
getNodeVisitors()
Returns the node visitor instances to add to the existing list. |
from Twig_Extension |
| array |
getFilters()
Returns a list of filters to add to the existing list. |
|
| array |
getTests()
Returns a list of tests to add to the existing list. |
|
| array |
getFunctions()
Returns a list of global functions to add to the existing list. |
|
| array |
getOperators()
Returns a list of operators to add to the existing list. |
|
| array |
getGlobals()
Returns a list of global variables to add to the existing list. |
from Twig_Extension |
|
setDateFormat(string $format = null, string $dateIntervalFormat = null)
Sets the default format to be used by the date filter. |
||
| array |
getDateFormat()
Gets the default format to be used by the date filter. |
|
|
setTimezone(DateTimeZone|string $timezone)
Sets the default timezone to be used by the date filter. |
||
| DateTimeZone |
getTimezone()
Gets the default timezone to be used by the date filter. |
|
|
setNumberFormat(integer $decimal, string $decimalPoint, string $thousandSep)
Sets the default format to be used by the number_format filter. |
||
| array |
getNumberFormat()
Get the default format used by the number_format filter. |
|
|
parseNotTestExpression(Twig_Parser $parser, $node)
|
||
|
parseTestExpression(Twig_Parser $parser, $node)
|
||
| string |
getName()
Returns the name of the extension. |
Details
in Twig_Extension at line 20
public
initRuntime(Twig_Environment $environment)
Initializes the runtime environment.
This is where you can load some file that contains filter functions for instance.
at line 99
public array
getTokenParsers()
Returns the token parser instance to add to the existing list.
in Twig_Extension at line 39
public array
getNodeVisitors()
Returns the node visitor instances to add to the existing list.
at line 125
public array
getFilters()
Returns a list of filters to add to the existing list.
at line 203
public array
getTests()
Returns a list of tests to add to the existing list.
at line 186
public array
getFunctions()
Returns a list of global functions to add to the existing list.
at line 224
public array
getOperators()
Returns a list of operators to add to the existing list.
in Twig_Extension at line 89
public array
getGlobals()
Returns a list of global variables to add to the existing list.
at line 27
public
setDateFormat(string $format = null, string $dateIntervalFormat = null)
Sets the default format to be used by the date filter.
at line 43
public array
getDateFormat()
Gets the default format to be used by the date filter.
at line 53
public
setTimezone(DateTimeZone|string $timezone)
Sets the default timezone to be used by the date filter.
at line 63
public DateTimeZone
getTimezone()
Gets the default timezone to be used by the date filter.
at line 79
public
setNumberFormat(integer $decimal, string $decimalPoint, string $thousandSep)
Sets the default format to be used by the number_format filter.
at line 89
public array
getNumberFormat()
Get the default format used by the number_format filter.
at line 261
public
parseNotTestExpression(Twig_Parser $parser, $node)
at line 266
public
parseTestExpression(Twig_Parser $parser, $node)
at line 305
public string
getName()
Returns the name of the extension.