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

exception.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 1.44 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\db\migration;
 15   
 16  /**
 17  * The migrator is responsible for applying new migrations in the correct order.
 18  */
 19  class exception extends \Exception
 20  {
 21      /**
 22      * Extra parameters sent to exception to aid in debugging
 23      * @var array
 24      */
 25      protected $parameters;
 26   
 27      /**
 28      * Throw an exception.
 29      *
 30      * First argument is the error message.
 31      * Additional arguments will be output with the error message.
 32      */
 33      public function __construct()
 34      {
 35          $parameters = func_get_args();
 36          $message = array_shift($parameters);
 37          parent::__construct($message);
 38   
 39          $this->parameters = $parameters;
 40      }
 41   
 42      /**
 43      * Output the error as a string
 44      *
 45      * @return string
 46      */
 47      public function __toString()
 48      {
 49          return $this->message . ': ' . var_export($this->parameters, true);
 50      }
 51   
 52      /**
 53      * Get the parameters
 54      *
 55      * @return array
 56      */
 57      public function getParameters()
 58      {
 59          return $this->parameters;
 60      }
 61   
 62      /**
 63      * Get localised message (with $user->lang())
 64      *
 65      * @param \phpbb\user $user
 66      * @return string
 67      */
 68      public function getLocalisedMessage(\phpbb\user $user)
 69      {
 70          $parameters = $this->getParameters();
 71          array_unshift($parameters, $this->getMessage());
 72   
 73          return call_user_func_array(array($user, 'lang'), $parameters);
 74      }
 75  }
 76