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

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

includephp.php

Zuletzt modifiziert: 09.10.2024, 12:55 - Dateigröße: 1.26 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  * @copyright Portions (c) 2009 Fabien Potencier, Armin Ronacher
08  * @license GNU General Public License, version 2 (GPL-2.0)
09  *
10  * For full copyright and license information, please see
11  * the docs/CREDITS.txt file.
12  *
13  */
14   
15  namespace phpbb\template\twig\tokenparser;
16   
17   
18  class includephp extends \Twig_TokenParser
19  {
20      /**
21      * Parses a token and returns a node.
22      *
23      * @param \Twig_Token $token A Twig_Token instance
24      *
25      * @return \Twig_NodeInterface A Twig_NodeInterface instance
26      */
27      public function parse(\Twig_Token $token)
28      {
29          $expr = $this->parser->getExpressionParser()->parseExpression();
30   
31          $stream = $this->parser->getStream();
32   
33          $ignoreMissing = false;
34          if ($stream->test(\Twig_Token::NAME_TYPE, 'ignore')) {
35              $stream->next();
36              $stream->expect(\Twig_Token::NAME_TYPE, 'missing');
37   
38              $ignoreMissing = true;
39          }
40   
41          $stream->expect(\Twig_Token::BLOCK_END_TYPE);
42   
43          return new \phpbb\template\twig\node\includephp($expr, $this->parser->getEnvironment(), $token->getLine(), $ignoreMissing, $this->getTag());
44      }
45   
46      /**
47      * Gets the tag name associated with this token parser.
48      *
49      * @return string The tag name
50      */
51      public function getTag()
52      {
53          return 'INCLUDEPHP';
54      }
55  }
56