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 |
Extends.php
01 <?php
02
03 /*
04 * This file is part of Twig.
05 *
06 * (c) 2009 Fabien Potencier
07 * (c) 2009 Armin Ronacher
08 *
09 * For the full copyright and license information, please view the LICENSE
10 * file that was distributed with this source code.
11 */
12
13 /**
14 * Extends a template by another one.
15 *
16 * <pre>
17 * {% extends "base.html" %}
18 * </pre>
19 */
20 class Twig_TokenParser_Extends extends Twig_TokenParser
21 {
22 public function parse(Twig_Token $token)
23 {
24 if (!$this->parser->isMainScope()) {
25 throw new Twig_Error_Syntax('Cannot extend from a block.', $token->getLine(), $this->parser->getFilename());
26 }
27
28 if (null !== $this->parser->getParent()) {
29 throw new Twig_Error_Syntax('Multiple extends tags are forbidden.', $token->getLine(), $this->parser->getFilename());
30 }
31 $this->parser->setParent($this->parser->getExpressionParser()->parseExpression());
32
33 $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE);
34 }
35
36 public function getTag()
37 {
38 return 'extends';
39 }
40 }
41