003 File Manager
Current Path:
/usr/local/www/sites/shared/phpmyadmin/vendor/twig/twig/lib/Twig
usr
/
local
/
www
/
sites
/
shared
/
phpmyadmin
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
📁
..
📄
Autoloader.php
(1.45 KB)
📄
BaseNodeVisitor.php
(192 B)
📁
Cache
📄
CacheInterface.php
(164 B)
📄
Compiler.php
(128 B)
📄
CompilerInterface.php
(664 B)
📄
ContainerRuntimeLoader.php
(212 B)
📄
Environment.php
(140 B)
📁
Error
📄
Error.php
(128 B)
📄
ExistsLoaderInterface.php
(194 B)
📄
ExpressionParser.php
(160 B)
📁
Extension
📄
Extension.php
(176 B)
📄
ExtensionInterface.php
(188 B)
📄
FactoryRuntimeLoader.php
(204 B)
📄
FileExtensionEscapingStrategy.php
(212 B)
📁
Filter
📄
Filter.php
(1.95 KB)
📄
FilterCallableInterface.php
(470 B)
📄
FilterInterface.php
(859 B)
📁
Function
📄
Function.php
(1.72 KB)
📄
FunctionCallableInterface.php
(476 B)
📄
FunctionInterface.php
(812 B)
📄
Lexer.php
(116 B)
📄
LexerInterface.php
(794 B)
📁
Loader
📄
LoaderInterface.php
(170 B)
📄
Markup.php
(120 B)
📁
Node
📄
Node.php
(122 B)
📄
NodeCaptureInterface.php
(186 B)
📄
NodeInterface.php
(673 B)
📄
NodeOutputInterface.php
(182 B)
📄
NodeTraverser.php
(148 B)
📁
NodeVisitor
📄
NodeVisitorInterface.php
(200 B)
📄
Parser.php
(120 B)
📄
ParserInterface.php
(709 B)
📁
Profiler
📄
RuntimeLoaderInterface.php
(212 B)
📁
Sandbox
📄
SimpleFilter.php
(138 B)
📄
SimpleFunction.php
(146 B)
📄
SimpleTest.php
(130 B)
📄
Source.php
(120 B)
📄
SourceContextLoaderInterface.php
(222 B)
📄
Template.php
(128 B)
📄
TemplateInterface.php
(1.2 KB)
📄
TemplateWrapper.php
(156 B)
📁
Test
📄
Test.php
(884 B)
📄
TestCallableInterface.php
(430 B)
📄
TestInterface.php
(504 B)
📄
Token.php
(116 B)
📁
TokenParser
📄
TokenParser.php
(188 B)
📄
TokenParserBroker.php
(3.5 KB)
📄
TokenParserBrokerInterface.php
(1.2 KB)
📄
TokenParserInterface.php
(200 B)
📄
TokenStream.php
(140 B)
📁
Util
Editing: TokenParserBroker.php
<?php /* * This file is part of Twig. * * (c) Fabien Potencier * (c) Arnaud Le Blanc * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Twig\TokenParser\TokenParserInterface; /** * Default implementation of a token parser broker. * * @author Arnaud Le Blanc <arnaud.lb@gmail.com> * * @deprecated since 1.12 (to be removed in 2.0) */ class Twig_TokenParserBroker implements Twig_TokenParserBrokerInterface { protected $parser; protected $parsers = []; protected $brokers = []; /** * @param array|\Traversable $parsers A \Traversable of Twig_TokenParserInterface instances * @param array|\Traversable $brokers A \Traversable of Twig_TokenParserBrokerInterface instances * @param bool $triggerDeprecationError */ public function __construct($parsers = [], $brokers = [], $triggerDeprecationError = true) { if ($triggerDeprecationError) { @trigger_error('The '.__CLASS__.' class is deprecated since version 1.12 and will be removed in 2.0.', E_USER_DEPRECATED); } foreach ($parsers as $parser) { if (!$parser instanceof TokenParserInterface) { throw new \LogicException('$parsers must a an array of Twig_TokenParserInterface.'); } $this->parsers[$parser->getTag()] = $parser; } foreach ($brokers as $broker) { if (!$broker instanceof Twig_TokenParserBrokerInterface) { throw new \LogicException('$brokers must a an array of Twig_TokenParserBrokerInterface.'); } $this->brokers[] = $broker; } } public function addTokenParser(TokenParserInterface $parser) { $this->parsers[$parser->getTag()] = $parser; } public function removeTokenParser(TokenParserInterface $parser) { $name = $parser->getTag(); if (isset($this->parsers[$name]) && $parser === $this->parsers[$name]) { unset($this->parsers[$name]); } } public function addTokenParserBroker(self $broker) { $this->brokers[] = $broker; } public function removeTokenParserBroker(self $broker) { if (false !== $pos = array_search($broker, $this->brokers)) { unset($this->brokers[$pos]); } } /** * Gets a suitable TokenParser for a tag. * * First looks in parsers, then in brokers. * * @param string $tag A tag name * * @return TokenParserInterface|null A Twig_TokenParserInterface or null if no suitable TokenParser was found */ public function getTokenParser($tag) { if (isset($this->parsers[$tag])) { return $this->parsers[$tag]; } $broker = end($this->brokers); while (false !== $broker) { $parser = $broker->getTokenParser($tag); if (null !== $parser) { return $parser; } $broker = prev($this->brokers); } } public function getParsers() { return $this->parsers; } public function getParser() { return $this->parser; } public function setParser(Twig_ParserInterface $parser) { $this->parser = $parser; foreach ($this->parsers as $tokenParser) { $tokenParser->setParser($parser); } foreach ($this->brokers as $broker) { $broker->setParser($parser); } } }
Upload File
Create Folder