123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?php
- namespace Symfony\Component\HttpKernel\Event;
- use Symfony\Component\HttpFoundation\Request;
- use Symfony\Component\HttpKernel\HttpKernelInterface;
- class GetResponseForExceptionEvent extends GetResponseEvent
- {
-
- private $exception;
-
- private $allowCustomResponseCode = false;
- public function __construct(HttpKernelInterface $kernel, Request $request, int $requestType, \Exception $e)
- {
- parent::__construct($kernel, $request, $requestType);
- $this->setException($e);
- }
-
- public function getException()
- {
- return $this->exception;
- }
-
- public function setException(\Exception $exception)
- {
- $this->exception = $exception;
- }
-
- public function allowCustomResponseCode()
- {
- $this->allowCustomResponseCode = true;
- }
-
- public function isAllowingCustomResponseCode()
- {
- return $this->allowCustomResponseCode;
- }
- }
|