芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/apv.mgaplay.com.br/vendor/twig/twig/lib/Twig/TokenParser/Filter.php
* {% filter upper %} * This text becomes uppercase * {% endfilter %} * * * @final */ class Twig_TokenParser_Filter extends Twig_TokenParser { public function parse(Twig_Token $token) { $name = $this->parser->getVarName(); $ref = new Twig_Node_Expression_BlockReference(new Twig_Node_Expression_Constant($name, $token->getLine()), null, $token->getLine(), $this->getTag()); $filter = $this->parser->getExpressionParser()->parseFilterExpressionRaw($ref, $this->getTag()); $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true); $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); $block = new Twig_Node_Block($name, $body, $token->getLine()); $this->parser->setBlock($name, $block); return new Twig_Node_Print($filter, $token->getLine(), $this->getTag()); } public function decideBlockEnd(Twig_Token $token) { return $token->test('endfilter'); } public function getTag() { return 'filter'; } } class_alias('Twig_TokenParser_Filter', 'Twig\TokenParser\FilterTokenParser', false);