Twig API
Class

Twig_Extension_Debug

class Twig_Extension_Debug extends Twig_Extension

Methods

initRuntime(Twig_Environment $environment)

Initializes the runtime environment.

from Twig_Extension
array getTokenParsers()

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

from Twig_Extension
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.

from Twig_Extension
array getTests()

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

from Twig_Extension
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.

from Twig_Extension
array getGlobals()

Returns a list of global variables to add to the existing list.

from Twig_Extension
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.

Parameters

Twig_Environment $environment The current Twig_Environment instance

in Twig_Extension at line 29
public array getTokenParsers()

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

Return Value

array An array of TwigTokenParserInterface or TwigTokenParserBrokerInterface instances

in Twig_Extension at line 39
public array getNodeVisitors()

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

Return Value

array An array of Twig_NodeVisitorInterface instances

in Twig_Extension at line 49
public array getFilters()

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

Return Value

array An array of filters

in Twig_Extension at line 59
public array getTests()

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

Return Value

array An array of tests

at line 18
public array getFunctions()

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

Return Value

array An array of global functions

in Twig_Extension at line 79
public array getOperators()

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

Return Value

array An array of operators

in Twig_Extension at line 89
public array getGlobals()

Returns a list of global variables to add to the existing list.

Return Value

array An array of global variables

at line 40
public string getName()

Returns the name of the extension.

Return Value

string The extension name