PEEL Shopping
Open source ecommerce : PEEL Shopping
Staging.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of Twig.
5  *
6  * (c) 2012 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 
20 {
21  protected $functions = array();
22  protected $filters = array();
23  protected $visitors = array();
24  protected $tokenParsers = array();
25  protected $globals = array();
26  protected $tests = array();
27 
28  public function addFunction($name, $function)
29  {
30  $this->functions[$name] = $function;
31  }
32 
36  public function getFunctions()
37  {
38  return $this->functions;
39  }
40 
41  public function addFilter($name, $filter)
42  {
43  $this->filters[$name] = $filter;
44  }
45 
49  public function getFilters()
50  {
51  return $this->filters;
52  }
53 
54  public function addNodeVisitor(Twig_NodeVisitorInterface $visitor)
55  {
56  $this->visitors[] = $visitor;
57  }
58 
62  public function getNodeVisitors()
63  {
64  return $this->visitors;
65  }
66 
67  public function addTokenParser(Twig_TokenParserInterface $parser)
68  {
69  $this->tokenParsers[] = $parser;
70  }
71 
75  public function getTokenParsers()
76  {
77  return $this->tokenParsers;
78  }
79 
80  public function addGlobal($name, $value)
81  {
82  $this->globals[$name] = $value;
83  }
84 
88  public function getGlobals()
89  {
90  return $this->globals;
91  }
92 
93  public function addTest($name, $test)
94  {
95  $this->tests[$name] = $test;
96  }
97 
101  public function getTests()
102  {
103  return $this->tests;
104  }
105 
109  public function getName()
110  {
111  return 'staging';
112  }
113 }
addTokenParser(Twig_TokenParserInterface $parser)
Definition: Staging.php:67
addGlobal($name, $value)
Definition: Staging.php:80
addFilter($name, $filter)
Definition: Staging.php:41
getFilters()
{Returns a list of filters to add to the existing list.array An array of filters} ...
Definition: Staging.php:49
Internal class.
Definition: Staging.php:19
addNodeVisitor(Twig_NodeVisitorInterface $visitor)
Definition: Staging.php:54
getFunctions()
{Returns a list of functions to add to the existing list.array An array of functions} ...
Definition: Staging.php:36
Interface implemented by token parsers.
getNodeVisitors()
{Returns the node visitor instances to add to the existing list.array An array of Twig_NodeVisitorInt...
Definition: Staging.php:62
getName()
{Returns the name of the extension.string The extension name}
Definition: Staging.php:109
getTests()
{Returns a list of tests to add to the existing list.array An array of tests}
Definition: Staging.php:101
addFunction($name, $function)
Definition: Staging.php:28
getGlobals()
{Returns a list of global variables to add to the existing list.array An array of global variables} ...
Definition: Staging.php:88
Twig_NodeVisitorInterface is the interface the all node visitor classes must implement.
addTest($name, $test)
Definition: Staging.php:93
getTokenParsers()
{Returns the token parser instances to add to the existing list.array An array of Twig_TokenParserInt...
Definition: Staging.php:75

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:18 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.