Interface Twig_ExtensionInterface

Implemented byTwig_Extension, Twig_Extension_Core, Twig_Extension_Debug, Twig_Extension_Escaper, Twig_Extension_Optimizer, Twig_Extension_Profiler, Twig_Extension_Sandbox, Twig_Extension_Staging, Twig_Extension_StringLoader

Interface implemented by extension classes.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
getFilters() Returns a list of filters to add to the existing list. Twig_ExtensionInterface
getFunctions() Returns a list of functions to add to the existing list. Twig_ExtensionInterface
getGlobals() Returns a list of global variables to add to the existing list. Twig_ExtensionInterface
getName() Returns the name of the extension. Twig_ExtensionInterface
getNodeVisitors() Returns the node visitor instances to add to the existing list. Twig_ExtensionInterface
getOperators() Returns a list of operators to add to the existing list. Twig_ExtensionInterface
getTests() Returns a list of tests to add to the existing list. Twig_ExtensionInterface
getTokenParsers() Returns the token parser instances to add to the existing list. Twig_ExtensionInterface
initRuntime() Initializes the runtime environment. Twig_ExtensionInterface

Method Details

getFilters() public abstract method

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

public abstract Twig_SimpleFilter[] getFilters ( )
getFunctions() public abstract method

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

public abstract Twig_SimpleFunction[] getFunctions ( )
getGlobals() public abstract method

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

public abstract array getGlobals ( )
return array

An array of global variables

getName() public abstract method

Returns the name of the extension.

public abstract string getName ( )
return string

The extension name

getNodeVisitors() public abstract method

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

public abstract Twig_NodeVisitorInterface[] getNodeVisitors ( )
return Twig_NodeVisitorInterface[]

An array of Twig_NodeVisitorInterface instances

getOperators() public abstract method

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

public abstract array getOperators ( )
return array

An array of operators

getTests() public abstract method

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

public abstract Twig_SimpleTest[] getTests ( )
getTokenParsers() public abstract method

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

public abstract Twig_TokenParserInterface[] getTokenParsers ( )
initRuntime() public abstract method

Initializes the runtime environment.

This is where you can load some file that contains filter functions for instance.

public abstract void initRuntime ( Twig_Environment $environment )
$environment Twig_Environment

The current Twig_Environment instance