Project

General

Profile

1
<?php
2

    
3
/*
4
 * This file is part of Twig.
5
 *
6
 * (c) 2009 Fabien Potencier
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
abstract class Twig_Extension implements Twig_ExtensionInterface
12
{
13
    /**
14
     * Initializes the runtime environment.
15
     *
16
     * This is where you can load some file that contains filter functions for instance.
17
     *
18
     * @param Twig_Environment $environment The current Twig_Environment instance
19
     */
20
    public function initRuntime(Twig_Environment $environment)
21
    {
22
    }
23

    
24
    /**
25
     * Returns the token parser instances to add to the existing list.
26
     *
27
     * @return array An array of Twig_TokenParserInterface or Twig_TokenParserBrokerInterface instances
28
     */
29
    public function getTokenParsers()
30
    {
31
        return array();
32
    }
33

    
34
    /**
35
     * Returns the node visitor instances to add to the existing list.
36
     *
37
     * @return array An array of Twig_NodeVisitorInterface instances
38
     */
39
    public function getNodeVisitors()
40
    {
41
        return array();
42
    }
43

    
44
    /**
45
     * Returns a list of filters to add to the existing list.
46
     *
47
     * @return array An array of filters
48
     */
49
    public function getFilters()
50
    {
51
        return array();
52
    }
53

    
54
    /**
55
     * Returns a list of tests to add to the existing list.
56
     *
57
     * @return array An array of tests
58
     */
59
    public function getTests()
60
    {
61
        return array();
62
    }
63

    
64
    /**
65
     * Returns a list of functions to add to the existing list.
66
     *
67
     * @return array An array of functions
68
     */
69
    public function getFunctions()
70
    {
71
        return array();
72
    }
73

    
74
    /**
75
     * Returns a list of operators to add to the existing list.
76
     *
77
     * @return array An array of operators
78
     */
79
    public function getOperators()
80
    {
81
        return array();
82
    }
83

    
84
    /**
85
     * Returns a list of global variables to add to the existing list.
86
     *
87
     * @return array An array of global variables
88
     */
89
    public function getGlobals()
90
    {
91
        return array();
92
    }
93
}
(8-8/33)