class GetResponseEvent extends KernelEvent

Allows to create a response for a request.

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.

Methods

Response|null
getResponse()

Returns the response object.

setResponse(Response $response)

Sets a response and stops event propagation.

bool
hasResponse()

Returns whether a response was set.

Details

at line line 34
Response|null getResponse()

Returns the response object.

Return Value

Response|null

at line line 42
setResponse(Response $response)

Sets a response and stops event propagation.

Parameters

Response $response

at line line 54
bool hasResponse()

Returns whether a response was set.

Return Value

bool Whether a response was set