PHP Класс Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent
Call setResponse() to set the response that will be returned for the
current request. The propagation of this event is stopped as soon as a
response is set.
You can also call setException() to replace the thrown exception. This
exception will be thrown if no response is set during processing of this
event.
Показать файл
Открыть проект
Примеры использования класса
Открытые методы
Метод |
Описание |
|
__construct ( Symfony\Component\HttpKernel\HttpKernelInterface $kernel, Request $request, $requestType, Exception $e ) |
|
|
getException ( ) : Exception |
Returns the thrown exception |
|
setException ( Exception $exception ) |
Replaces the thrown exception |
|
Описание методов
__construct()
публичный Метод
public __construct ( Symfony\Component\HttpKernel\HttpKernelInterface $kernel, Request $request, $requestType, Exception $e ) |
$kernel |
Symfony\Component\HttpKernel\HttpKernelInterface |
|
$request |
Symfony\Component\HttpFoundation\Request |
|
$e |
Exception |
|
getException()
публичный Метод
Returns the thrown exception
public getException ( ) : Exception |
Результат |
Exception |
The thrown exception |
setException()
публичный Метод
This exception will be thrown if no response is set in the event.
public setException ( Exception $exception ) |
$exception |
Exception |
The thrown exception |