Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
Filter.php
01 <?php
02
03 /*
04 * This file is part of Twig.
05 *
06 * (c) 2009 Fabien Potencier
07 *
08 * For the full copyright and license information, please view the LICENSE
09 * file that was distributed with this source code.
10 */
11
12 /**
13 * Filters a section of a template by applying filters.
14 *
15 * <pre>
16 * {% filter upper %}
17 * This text becomes uppercase
18 * {% endfilter %}
19 * </pre>
20 */
21 class Twig_TokenParser_Filter extends Twig_TokenParser
22 {
23 public function parse(Twig_Token $token)
24 {
25 $name = $this->parser->getVarName();
26 $ref = new Twig_Node_Expression_BlockReference(new Twig_Node_Expression_Constant($name, $token->getLine()), true, $token->getLine(), $this->getTag());
27
28 $filter = $this->parser->getExpressionParser()->parseFilterExpressionRaw($ref, $this->getTag());
29 $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
30
31 $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true);
32 $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
33
34 $block = new Twig_Node_Block($name, $body, $token->getLine());
35 $this->parser->setBlock($name, $block);
36
37 return new Twig_Node_Print($filter, $token->getLine(), $this->getTag());
38 }
39
40 public function decideBlockEnd(Twig_Token $token)
41 {
42 return $token->test('endfilter');
43 }
44
45 public function getTag()
46 {
47 return 'filter';
48 }
49 }
50