class GetResponseForControllerResultEvent extends GetResponseEvent

Allows to create a response for the return value of a controller.

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
getResponse()

Returns the response object.

setResponse(Response $response)

Sets a response and stops event propagation.

bool
hasResponse()

Returns whether a response was set.

__construct(HttpKernelInterface $kernel, Request $request, int $requestType, $controllerResult)

No description

mixed
getControllerResult()

Returns the return value of the controller.

setControllerResult(mixed $controllerResult)

Assigns the return value of the controller.

Details

in GetResponseEvent at line line 34
Response getResponse()

Returns the response object.

Return Value

Response

in GetResponseEvent at line line 42
setResponse(Response $response)

Sets a response and stops event propagation.

Parameters

Response $response

in GetResponseEvent at line line 54
bool hasResponse()

Returns whether a response was set.

Return Value

bool Whether a response was set

at line line 35
__construct(HttpKernelInterface $kernel, Request $request, int $requestType, $controllerResult)

Parameters

HttpKernelInterface $kernel
Request $request
int $requestType
$controllerResult

at line line 47
mixed getControllerResult()

Returns the return value of the controller.

Return Value

mixed The controller return value

at line line 57
setControllerResult(mixed $controllerResult)

Assigns the return value of the controller.

Parameters

mixed $controllerResult The controller return value