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.
Response | getResponse() Returns the response object. | from GetResponseEvent |
setResponse(Response $response) Sets a response and stops event propagation. | from GetResponseEvent | |
bool | hasResponse() Returns whether a response was set. | from GetResponseEvent |
__construct(HttpKernelInterface $kernel, Request $request, int $requestType, $controllerResult) | ||
mixed | getControllerResult() Returns the return value of the controller. | |
setControllerResult(mixed $controllerResult) Assigns the return value of the controller. |
Returns the response object.
Response |
Sets a response and stops event propagation.
Response | $response |
Returns whether a response was set.
bool | Whether a response was set |
HttpKernelInterface | $kernel | |
Request | $request | |
int | $requestType | |
$controllerResult |
Returns the return value of the controller.
mixed | The controller return value |
Assigns the return value of the controller.
mixed | $controllerResult | The controller return value |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/4.0/Symfony/Component/HttpKernel/Event/GetResponseForControllerResultEvent.html