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

GetResponseForExceptionEvent.php

Zuletzt modifiziert: 09.10.2024, 12:56 - Dateigröße: 1.67 KiB


01  <?php
02   
03  /*
04   * This file is part of the Symfony package.
05   *
06   * (c) Fabien Potencier <fabien@symfony.com>
07   *
08   * For the full copyright and license information, please view the LICENSE
09   * file that was distributed with this source code.
10   */
11   
12  namespace Symfony\Component\HttpKernel\Event;
13   
14  use Symfony\Component\HttpKernel\HttpKernelInterface;
15  use Symfony\Component\HttpFoundation\Request;
16   
17  /**
18   * Allows to create a response for a thrown exception.
19   *
20   * Call setResponse() to set the response that will be returned for the
21   * current request. The propagation of this event is stopped as soon as a
22   * response is set.
23   *
24   * You can also call setException() to replace the thrown exception. This
25   * exception will be thrown if no response is set during processing of this
26   * event.
27   *
28   * @author Bernhard Schussek <bschussek@gmail.com>
29   */
30  class GetResponseForExceptionEvent extends GetResponseEvent
31  {
32      /**
33       * The exception object.
34       *
35       * @var \Exception
36       */
37      private $exception;
38   
39      public function __construct(HttpKernelInterface $kernel, Request $request, $requestType, \Exception $e)
40      {
41          parent::__construct($kernel, $request, $requestType);
42   
43          $this->setException($e);
44      }
45   
46      /**
47       * Returns the thrown exception.
48       *
49       * @return \Exception The thrown exception
50       */
51      public function getException()
52      {
53          return $this->exception;
54      }
55   
56      /**
57       * Replaces the thrown exception.
58       *
59       * This exception will be thrown if no response is set in the event.
60       *
61       * @param \Exception $exception The thrown exception
62       */
63      public function setException(\Exception $exception)
64      {
65          $this->exception = $exception;
66      }
67  }
68