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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
GetResponseForExceptionEvent.php
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 * @api
31 */
32 class GetResponseForExceptionEvent extends GetResponseEvent
33 {
34 /**
35 * The exception object
36 * @var \Exception
37 */
38 private $exception;
39
40 public function __construct(HttpKernelInterface $kernel, Request $request, $requestType, \Exception $e)
41 {
42 parent::__construct($kernel, $request, $requestType);
43
44 $this->setException($e);
45 }
46
47 /**
48 * Returns the thrown exception
49 *
50 * @return \Exception The thrown exception
51 *
52 * @api
53 */
54 public function getException()
55 {
56 return $this->exception;
57 }
58
59 /**
60 * Replaces the thrown exception
61 *
62 * This exception will be thrown if no response is set in the event.
63 *
64 * @param \Exception $exception The thrown exception
65 *
66 * @api
67 */
68 public function setException(\Exception $exception)
69 {
70 $this->exception = $exception;
71 }
72 }
73