ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Twig_ExtensionInterface Interface Reference

Interface implemented by extension classes. More...

+ Inheritance diagram for Twig_ExtensionInterface:
+ Collaboration diagram for Twig_ExtensionInterface:

Public Member Functions

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

Detailed Description

Interface implemented by extension classes.

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 17 of file ExtensionInterface.php.

Member Function Documentation

◆ getFilters()

◆ getFunctions()

Twig_ExtensionInterface::getFunctions ( )

◆ getGlobals()

Twig_ExtensionInterface::getGlobals ( )

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

Returns
array An array of global variables
Deprecated:
since 1.23 (to be removed in 2.0), implement Twig_Extension_GlobalsInterface instead

Implemented in Twig_Tests_EnvironmentTest_Extension, Twig_Tests_EnvironmentTest_Extension_WithGlobals, Twig_Extension_Staging, InvalidOperatorExtension, and Twig_Extension.

◆ getName()

◆ getNodeVisitors()

Twig_ExtensionInterface::getNodeVisitors ( )

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

Returns
Twig_NodeVisitorInterface[]

Implemented in Twig_Tests_EnvironmentTest_Extension, Twig_Extension_Staging, InvalidOperatorExtension, Twig_Extension_Profiler, Twig_Extension_Escaper, Twig_Extension_Sandbox, Twig_Extension, and Twig_Extension_Optimizer.

Referenced by Twig_Environment\initExtension().

+ Here is the caller graph for this function:

◆ getOperators()

Twig_ExtensionInterface::getOperators ( )

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

Returns
array<array> First array of unary operators, second array of binary operators

Implemented in Twig_Tests_EnvironmentTest_Extension, Twig_Extension_Core, InvalidOperatorExtension, and Twig_Extension.

Referenced by Twig_Environment\initExtension().

+ Here is the caller graph for this function:

◆ getTests()

Twig_ExtensionInterface::getTests ( )

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

Returns
Twig_SimpleTest[]

Implemented in Twig_Tests_EnvironmentTest_Extension, Twig_Extension_Core, TwigTestExtension, Twig_Extension_Staging, InvalidOperatorExtension, LegacyTwigTestExtension, and Twig_Extension.

Referenced by Twig_Environment\initExtension().

+ Here is the caller graph for this function:

◆ getTokenParsers()

Twig_ExtensionInterface::getTokenParsers ( )

◆ initRuntime()

Twig_ExtensionInterface::initRuntime ( Twig_Environment  $environment)

Initializes the runtime 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

Implemented in Twig_Tests_EnvironmentTest_ExtensionWithoutDeprecationInitRuntime, Twig_Tests_EnvironmentTest_ExtensionWithDeprecationInitRuntime, InvalidOperatorExtension, and Twig_Extension.


The documentation for this interface was generated from the following file: