Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/http-kernel/Event/GetResponseForExceptionEvent.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | 4c8ae668cc8c |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
34 * | 34 * |
35 * @var \Exception | 35 * @var \Exception |
36 */ | 36 */ |
37 private $exception; | 37 private $exception; |
38 | 38 |
39 /** | |
40 * @var bool | |
41 */ | |
42 private $allowCustomResponseCode = false; | |
43 | |
39 public function __construct(HttpKernelInterface $kernel, Request $request, $requestType, \Exception $e) | 44 public function __construct(HttpKernelInterface $kernel, Request $request, $requestType, \Exception $e) |
40 { | 45 { |
41 parent::__construct($kernel, $request, $requestType); | 46 parent::__construct($kernel, $request, $requestType); |
42 | 47 |
43 $this->setException($e); | 48 $this->setException($e); |
62 */ | 67 */ |
63 public function setException(\Exception $exception) | 68 public function setException(\Exception $exception) |
64 { | 69 { |
65 $this->exception = $exception; | 70 $this->exception = $exception; |
66 } | 71 } |
72 | |
73 /** | |
74 * Mark the event as allowing a custom response code. | |
75 */ | |
76 public function allowCustomResponseCode() | |
77 { | |
78 $this->allowCustomResponseCode = true; | |
79 } | |
80 | |
81 /** | |
82 * Returns true if the event allows a custom response code. | |
83 * | |
84 * @return bool | |
85 */ | |
86 public function isAllowingCustomResponseCode() | |
87 { | |
88 return $this->allowCustomResponseCode; | |
89 } | |
67 } | 90 } |