]>
git.immae.eu Git - github/wallabag/wallabag.git/blob - vendor/twig/twig/lib/Twig/ExtensionInterface.php
f189e9d9d09e146c3cf567d40c8d2144c8722827
4 * This file is part of Twig.
6 * (c) 2009 Fabien Potencier
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
13 * Interface implemented by extension classes.
15 * @author Fabien Potencier <fabien@symfony.com>
17 interface Twig_ExtensionInterface
20 * Initializes the runtime environment.
22 * This is where you can load some file that contains filter functions for instance.
24 * @param Twig_Environment $environment The current Twig_Environment instance
26 public function initRuntime(Twig_Environment
$environment);
29 * Returns the token parser instances to add to the existing list.
31 * @return array An array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances
33 public function getTokenParsers();
36 * Returns the node visitor instances to add to the existing list.
38 * @return array An array of Twig_NodeVisitorInterface instances
40 public function getNodeVisitors();
43 * Returns a list of filters to add to the existing list.
45 * @return array An array of filters
47 public function getFilters();
50 * Returns a list of tests to add to the existing list.
52 * @return array An array of tests
54 public function getTests();
57 * Returns a list of functions to add to the existing list.
59 * @return array An array of functions
61 public function getFunctions();
64 * Returns a list of operators to add to the existing list.
66 * @return array An array of operators
68 public function getOperators();
71 * Returns a list of global variables to add to the existing list.
73 * @return array An array of global variables
75 public function getGlobals();
78 * Returns the name of the extension.
80 * @return string The extension name
82 public function getName();