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

base.php

Zuletzt modifiziert: 09.10.2024, 12:52 - Dateigröße: 2.77 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 assign_block_vars($blockname, array $vararray)
111      {
112          $this->context->assign_block_vars($blockname, $vararray);
113   
114          return $this;
115      }
116   
117      /**
118      * {@inheritdoc}
119      */
120      public function assign_block_vars_array($blockname, array $block_vars_array)
121      {
122          $this->context->assign_block_vars_array($blockname, $block_vars_array);
123   
124          return $this;
125      }
126   
127      /**
128      * {@inheritdoc}
129      */
130      public function alter_block_array($blockname, array $vararray, $key = false, $mode = 'insert')
131      {
132          return $this->context->alter_block_array($blockname, $vararray, $key, $mode);
133      }
134   
135      /**
136      * Calls hook if any is defined.
137      *
138      * @param string $handle Template handle being displayed.
139      * @param string $method Method name of the caller.
140      */
141      protected function call_hook($handle, $method)
142      {
143          global $phpbb_hook;
144   
145          if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array('template', $method), $handle, $this))
146          {
147              if ($phpbb_hook->hook_return(array('template', $method)))
148              {
149                  $result = $phpbb_hook->hook_return_result(array('template', $method));
150                  return array($result);
151              }
152          }
153   
154          return false;
155      }
156  }
157