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

http_exception.php

Zuletzt modifiziert: 09.10.2024, 12:52 - Dateigröße: 1.57 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\exception;
15   
16  use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
17   
18  /**
19   * Class http_exception
20   */
21  class http_exception extends runtime_exception implements HttpExceptionInterface
22  {
23      /**
24       * Http status code.
25       *
26       * @var integer
27       */
28      private $status_code;
29   
30      /**
31       * Additional headers to set in the response.
32       *
33       * @var array
34       */
35      private $headers;
36   
37      /**
38       * Constructor
39       *
40       * @param integer        $status_code    The http status code.
41       * @param string        $message        The Exception message to throw (must be a language variable).
42       * @param array            $parameters        The parameters to use with the language var.
43       * @param \Exception    $previous        The previous exception used for the exception chaining.
44       * @param array            $headers        Additional headers to set in the response.
45       * @param integer        $code            The Exception code.
46       */
47      public function __construct($status_code, $message = "", array $parameters = array(), \Exception $previous = null, array $headers = array(), $code = 0)
48      {
49          $this->status_code = $status_code;
50          $this->headers = $headers;
51   
52          parent::__construct($message, $parameters, $previous, $code);
53      }
54   
55      /**
56       * {@inheritdoc}
57       */
58      public function getStatusCode()
59      {
60          return $this->status_code;
61      }
62   
63      /**
64       * {@inheritdoc}
65       */
66      public function getHeaders()
67      {
68          return $this->headers;
69      }
70  }
71