Verzeichnisstruktur phpBB-3.1.0
- Veröffentlicht
- 27.10.2014
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 |
php.php
01 <?php
02 /**
03 *
04 * This file is part of the phpBB Forum Software package.
05 *
06 * @copyright (c) phpBB Limited <https://www.phpbb.com>
07 * @license GNU General Public License, version 2 (GPL-2.0)
08 *
09 * For full copyright and license information, please see
10 * the docs/CREDITS.txt file.
11 *
12 */
13
14 namespace phpbb\template\twig\tokenparser;
15
16
17 class php extends \Twig_TokenParser
18 {
19 /**
20 * Parses a token and returns a node.
21 *
22 * @param \Twig_Token $token A Twig_Token instance
23 *
24 * @return \Twig_NodeInterface A Twig_NodeInterface instance
25 */
26 public function parse(\Twig_Token $token)
27 {
28 $stream = $this->parser->getStream();
29
30 $stream->expect(\Twig_Token::BLOCK_END_TYPE);
31
32 $body = $this->parser->subparse(array($this, 'decideEnd'), true);
33
34 $stream->expect(\Twig_Token::BLOCK_END_TYPE);
35
36 return new \phpbb\template\twig\node\php($body, $this->parser->getEnvironment(), $token->getLine(), $this->getTag());
37 }
38
39 public function decideEnd(\Twig_Token $token)
40 {
41 return $token->test('ENDPHP');
42 }
43
44 /**
45 * Gets the tag name associated with this token parser.
46 *
47 * @return string The tag name
48 */
49 public function getTag()
50 {
51 return 'PHP';
52 }
53 }
54