12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <?php
- namespace Symfony\Component\HttpKernel\Event;
- use Symfony\Component\HttpFoundation\Request;
- use Symfony\Component\HttpKernel\HttpKernelInterface;
- final class ExceptionEvent extends RequestEvent
- {
- private $throwable;
-
- private $allowCustomResponseCode = false;
- public function __construct(HttpKernelInterface $kernel, Request $request, int $requestType, \Throwable $e)
- {
- parent::__construct($kernel, $request, $requestType);
- $this->setThrowable($e);
- }
- public function getThrowable(): \Throwable
- {
- return $this->throwable;
- }
-
- public function setThrowable(\Throwable $exception): void
- {
- $this->throwable = $exception;
- }
-
- public function allowCustomResponseCode(): void
- {
- $this->allowCustomResponseCode = true;
- }
-
- public function isAllowingCustomResponseCode(): bool
- {
- return $this->allowCustomResponseCode;
- }
- }
|