Verzeichnisstruktur phpBB-3.3.16


Veröffentlicht
27.04.2026

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

base.php

Zuletzt modifiziert: 01.05.2026, 11:25 - Dateigröße: 3.41 KiB


 001  <?php
 002  /**
 003  *
 004  * This file is part of the phpBB Forum Software package.
 005  *
 006  * @copyright (c) phpBB Limited <https://www.phpbb.com>
 007  * @license GNU General Public License, version 2 (GPL-2.0)
 008  *
 009  * For full copyright and license information, please see
 010  * the docs/CREDITS.txt file.
 011  *
 012  */
 013   
 014  namespace phpbb\template;
 015   
 016  abstract class base implements template
 017  {
 018      /**
 019      * Template context.
 020      * Stores template data used during template rendering.
 021      *
 022      * @var \phpbb\template\context
 023      */
 024      protected $context;
 025   
 026      /**
 027      * Array of filenames assigned to set_filenames
 028      *
 029      * @var array
 030      */
 031      protected $filenames = array();
 032   
 033      /**
 034      * {@inheritdoc}
 035      */
 036      public function set_filenames(array $filename_array)
 037      {
 038          $this->filenames = array_merge($this->filenames, $filename_array);
 039   
 040          return $this;
 041      }
 042   
 043      /**
 044      * Get a filename from the handle
 045      *
 046      * @param string $handle
 047      * @return string
 048      */
 049      protected function get_filename_from_handle($handle)
 050      {
 051          return (isset($this->filenames[$handle])) ? $this->filenames[$handle] : $handle;
 052      }
 053   
 054      /**
 055      * {@inheritdoc}
 056      */
 057      public function destroy()
 058      {
 059          $this->context->clear();
 060   
 061          return $this;
 062      }
 063   
 064      /**
 065      * {@inheritdoc}
 066      */
 067      public function destroy_block_vars($blockname)
 068      {
 069          $this->context->destroy_block_vars($blockname);
 070   
 071          return $this;
 072      }
 073   
 074      /**
 075      * {@inheritdoc}
 076      */
 077      public function assign_vars(array $vararray)
 078      {
 079          foreach ($vararray as $key => $val)
 080          {
 081              $this->assign_var($key, $val);
 082          }
 083   
 084          return $this;
 085      }
 086   
 087      /**
 088      * {@inheritdoc}
 089      */
 090      public function assign_var($varname, $varval)
 091      {
 092          $this->context->assign_var($varname, $varval);
 093   
 094          return $this;
 095      }
 096   
 097      /**
 098      * {@inheritdoc}
 099      */
 100      public function append_var($varname, $varval)
 101      {
 102          $this->context->append_var($varname, $varval);
 103   
 104          return $this;
 105      }
 106   
 107      /**
 108      * {@inheritdoc}
 109      */
 110      public function retrieve_vars(array $vararray)
 111      {
 112          $result = array();
 113          foreach ($vararray as $varname)
 114          {
 115              $result[$varname] = $this->retrieve_var($varname);
 116          }
 117          return $result;
 118      }
 119   
 120      /**
 121      * {@inheritdoc}
 122      */
 123      public function retrieve_var($varname)
 124      {
 125          return $this->context->retrieve_var($varname);
 126      }
 127   
 128      /**
 129      * {@inheritdoc}
 130      */
 131      public function assign_block_vars($blockname, array $vararray)
 132      {
 133          $this->context->assign_block_vars($blockname, $vararray);
 134   
 135          return $this;
 136      }
 137   
 138      /**
 139      * {@inheritdoc}
 140      */
 141      public function assign_block_vars_array($blockname, array $block_vars_array)
 142      {
 143          $this->context->assign_block_vars_array($blockname, $block_vars_array);
 144   
 145          return $this;
 146      }
 147   
 148      /**
 149      * {@inheritdoc}
 150      */
 151      public function retrieve_block_vars($blockname, array $vararray)
 152      {
 153          return $this->context->retrieve_block_vars($blockname, $vararray);
 154      }
 155   
 156      /**
 157      * {@inheritdoc}
 158      */
 159      public function alter_block_array($blockname, array $vararray, $key = false, $mode = 'insert')
 160      {
 161          return $this->context->alter_block_array($blockname, $vararray, $key, $mode);
 162      }
 163   
 164      /**
 165      * {@inheritdoc}
 166      */
 167      public function find_key_index($blockname, $key)
 168      {
 169          return $this->context->find_key_index($blockname, $key);
 170      }
 171   
 172      /**
 173      * Calls hook if any is defined.
 174      *
 175      * @param string $handle Template handle being displayed.
 176      * @param string $method Method name of the caller.
 177      */
 178      protected function call_hook($handle, $method)
 179      {
 180          global $phpbb_hook;
 181   
 182          if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array('template', $method), $handle, $this))
 183          {
 184              if ($phpbb_hook->hook_return(array('template', $method)))
 185              {
 186                  $result = $phpbb_hook->hook_return_result(array('template', $method));
 187                  return array($result);
 188              }
 189          }
 190   
 191          return false;
 192      }
 193  }
 194