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

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

definition.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 1.22 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;
15   
16  /**
17  * This class holds all DEFINE variables from the current page load
18  */
19  class definition
20  {
21      /** @var array **/
22      protected $definitions = array();
23   
24      /**
25      * Get a DEFINE'd variable
26      *
27      * @param string $name
28      * @param array $arguments
29      *
30      * @return mixed Null if not found
31      */
32      public function __call($name, $arguments)
33      {
34          return (isset($this->definitions[$name])) ? $this->definitions[$name] : null;
35      }
36   
37      /**
38      * DEFINE a variable
39      *
40      * @param string $name
41      * @param mixed $value
42      * @return \phpbb\template\twig\definition
43      */
44      public function set($name, $value)
45      {
46          $this->definitions[$name] = $value;
47   
48          return $this;
49      }
50   
51      /**
52      * Append to a variable
53      *
54      * @param string $name
55      * @param string $value
56      * @return \phpbb\template\twig\definition
57      */
58      public function append($name, $value)
59      {
60          if (!isset($this->definitions[$name]))
61          {
62              $this->definitions[$name] = '';
63          }
64   
65          $this->definitions[$name] .= $value;
66   
67          return $this;
68      }
69  }
70