Source of file Staging.php
Size: 2,096 Bytes - Last Modified: 2013-06-06T08:06:01+02:00
/home/theseer/Downloads/Symfony/vendor/twig/twig/lib/Twig/Extension/Staging.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114 | <?php /* * This file is part of Twig. * * (c) 2012 Fabien Potencier * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ /** * Internal class. * * This class is used by Twig_Environment as a staging area and must not be used directly. * * @author Fabien Potencier <fabien@symfony.com> */ class Twig_Extension_Staging extends Twig_Extension { protected $functions = array(); protected $filters = array(); protected $visitors = array(); protected $tokenParsers = array(); protected $globals = array(); protected $tests = array(); public function addFunction($name, $function) { $this->functions[$name] = $function; } /** * {@inheritdoc} */ public function getFunctions() { return $this->functions; } public function addFilter($name, $filter) { $this->filters[$name] = $filter; } /** * {@inheritdoc} */ public function getFilters() { return $this->filters; } public function addNodeVisitor(Twig_NodeVisitorInterface $visitor) { $this->visitors[] = $visitor; } /** * {@inheritdoc} */ public function getNodeVisitors() { return $this->visitors; } public function addTokenParser(Twig_TokenParserInterface $parser) { $this->tokenParsers[] = $parser; } /** * {@inheritdoc} */ public function getTokenParsers() { return $this->tokenParsers; } public function addGlobal($name, $value) { $this->globals[$name] = $value; } /** * {@inheritdoc} */ public function getGlobals() { return $this->globals; } public function addTest($name, $test) { $this->tests[$name] = $test; } /** * {@inheritdoc} */ public function getTests() { return $this->tests; } /** * {@inheritdoc} */ public function getName() { return 'staging'; } } |