Verzeichnisstruktur phpBB-3.3.15


Veröffentlicht
28.08.2024

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.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

php.php

Zuletzt modifiziert: 02.04.2025, 15:02 - Dateigröße: 1.38 KiB


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  class php extends \Twig\TokenParser\AbstractTokenParser
17  {
18      /** @var \phpbb\template\twig\environment */
19      protected $environment;
20   
21      /**
22      * Constructor
23      *
24      * @param \phpbb\template\twig\environment $environment
25      */
26      public function __construct(\phpbb\template\twig\environment $environment)
27      {
28          $this->environment = $environment;
29      }
30   
31      /**
32      * Parses a token and returns a node.
33      *
34      * @param \Twig\Token $token A Twig\Token instance
35      *
36      * @return \Twig\Node\Node A Twig\Node instance
37      */
38      public function parse(\Twig\Token $token)
39      {
40          $stream = $this->parser->getStream();
41   
42          $stream->expect(\Twig\Token::BLOCK_END_TYPE);
43   
44          $body = $this->parser->subparse(array($this, 'decideEnd'), true);
45   
46          $stream->expect(\Twig\Token::BLOCK_END_TYPE);
47   
48          return new \phpbb\template\twig\node\php($body, $this->environment, $token->getLine(), $this->getTag());
49      }
50   
51      public function decideEnd(\Twig\Token $token)
52      {
53          return $token->test('ENDPHP');
54      }
55   
56      /**
57      * Gets the tag name associated with this token parser.
58      *
59      * @return string The tag name
60      */
61      public function getTag()
62      {
63          return 'PHP';
64      }
65  }
66