FileAccess Orion

GetResponseForExceptionEvent extends RequestEvent
in package

Allows to create a response for a request.

Tags
deprecated

since Symfony 4.3, use ExceptionEvent instead

Table of Contents

$allowCustomResponseCode  : mixed
$exception  : mixed
$kernel  : mixed
$propagationStopped  : mixed
$request  : mixed
$requestType  : mixed
$response  : mixed
$throwable  : mixed
__construct()  : mixed
allowCustomResponseCode()  : mixed
Mark the event as allowing a custom response code.
getException()  : Exception
getKernel()  : HttpKernelInterface
Returns the kernel in which this event was thrown.
getRequest()  : Request
Returns the request the kernel is currently processing.
getRequestType()  : int
Returns the request type the kernel is currently processing.
getResponse()  : Response|null
Returns the response object.
getThrowable()  : Throwable
hasResponse()  : bool
Returns whether a response was set.
isAllowingCustomResponseCode()  : bool
Returns true if the event allows a custom response code.
isMasterRequest()  : bool
Checks if this is a master request.
isPropagationStopped()  : bool
setException()  : mixed
setResponse()  : mixed
Sets a response and stops event propagation.
setThrowable()  : void
Replaces the thrown exception.
stopPropagation()  : mixed

Properties

$propagationStopped

private mixed $propagationStopped = false

Methods

allowCustomResponseCode()

Mark the event as allowing a custom response code.

public allowCustomResponseCode() : mixed
Return values
mixed

getException()

public getException() : Exception
Tags
deprecated

since Symfony 4.4, use getThrowable instead

Return values
Exception

The thrown exception

getRequest()

Returns the request the kernel is currently processing.

public getRequest() : Request
Return values
Request

getRequestType()

Returns the request type the kernel is currently processing.

public getRequestType() : int
Return values
int

One of HttpKernelInterface::MASTER_REQUEST and HttpKernelInterface::SUB_REQUEST

hasResponse()

Returns whether a response was set.

public hasResponse() : bool
Return values
bool

Whether a response was set

isAllowingCustomResponseCode()

Returns true if the event allows a custom response code.

public isAllowingCustomResponseCode() : bool
Return values
bool

isMasterRequest()

Checks if this is a master request.

public isMasterRequest() : bool
Return values
bool

True if the request is a master request

isPropagationStopped()

public isPropagationStopped() : bool
Tags
deprecated

since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead

Return values
bool

Whether propagation was already stopped for this event

setException()

public setException(Exception $exception) : mixed
Parameters
$exception : Exception

The thrown exception

Tags
deprecated

since Symfony 4.4, use setThrowable instead

Return values
mixed

setResponse()

Sets a response and stops event propagation.

public setResponse(Response $response) : mixed
Parameters
$response : Response
Return values
mixed

setThrowable()

Replaces the thrown exception.

public setThrowable(Throwable $exception) : void

This exception will be thrown if no response is set in the event.

Parameters
$exception : Throwable
Return values
void

stopPropagation()

public stopPropagation() : mixed
Tags
deprecated

since Symfony 4.3, use "Symfony\Contracts\EventDispatcher\Event" instead

Return values
mixed

Search results