class GetResponseForControllerResultEvent in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Event/GetResponseForControllerResultEvent.php \Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent
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.
@author Bernhard Schussek <bschussek@gmail.com>
Hierarchy
- class \Symfony\Component\EventDispatcher\Event
- class \Symfony\Component\HttpKernel\Event\KernelEvent
- class \Symfony\Component\HttpKernel\Event\GetResponseEvent
- class \Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent
- class \Symfony\Component\HttpKernel\Event\GetResponseEvent
- class \Symfony\Component\HttpKernel\Event\KernelEvent
Expanded class hierarchy of GetResponseForControllerResultEvent
6 files declare their use of GetResponseForControllerResultEvent
- AcceptNegotiation406.php in core/
lib/ Drupal/ Core/ EventSubscriber/ AcceptNegotiation406.php - Contains \Drupal\Core\EventSubscriber\AcceptNegotiation406.
- FormAjaxSubscriber.php in core/
lib/ Drupal/ Core/ Form/ EventSubscriber/ FormAjaxSubscriber.php - Contains \Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber.
- HttpKernel.php in vendor/
symfony/ http-kernel/ HttpKernel.php - MainContentViewSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ MainContentViewSubscriber.php - Contains \Drupal\Core\EventSubscriber\MainContentViewSubscriber.
- PsrResponseSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ PsrResponseSubscriber.php - Contains \Drupal\Core\EventSubscriber\PsrResponseSubscriber.
File
- vendor/
symfony/ http-kernel/ Event/ GetResponseForControllerResultEvent.php, line 26
Namespace
Symfony\Component\HttpKernel\EventView source
class GetResponseForControllerResultEvent extends GetResponseEvent {
/**
* The return value of the controller.
*
* @var mixed
*/
private $controllerResult;
public function __construct(HttpKernelInterface $kernel, Request $request, $requestType, $controllerResult) {
parent::__construct($kernel, $request, $requestType);
$this->controllerResult = $controllerResult;
}
/**
* Returns the return value of the controller.
*
* @return mixed The controller return value
*/
public function getControllerResult() {
return $this->controllerResult;
}
/**
* Assigns the return value of the controller.
*
* @param mixed $controllerResult The controller return value
*/
public function setControllerResult($controllerResult) {
$this->controllerResult = $controllerResult;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Event:: |
private | property | ||
Event:: |
private | property | ||
Event:: |
private | property | ||
Event:: |
public | function | Returns the EventDispatcher that dispatches this Event. | |
Event:: |
public | function | Gets the event's name. | |
Event:: |
public | function | Returns whether further event listeners should be triggered. | |
Event:: |
public | function | Stores the EventDispatcher that dispatches this Event. | |
Event:: |
public | function | Sets the event's name property. | |
Event:: |
public | function | Stops the propagation of the event to further event listeners. | |
GetResponseEvent:: |
private | property | The response object. | |
GetResponseEvent:: |
public | function | Returns the response object. | |
GetResponseEvent:: |
public | function | Returns whether a response was set. | |
GetResponseEvent:: |
public | function | Sets a response and stops event propagation. | |
GetResponseForControllerResultEvent:: |
private | property | The return value of the controller. | |
GetResponseForControllerResultEvent:: |
public | function | Returns the return value of the controller. | |
GetResponseForControllerResultEvent:: |
public | function | Assigns the return value of the controller. | |
GetResponseForControllerResultEvent:: |
public | function |
Overrides KernelEvent:: |
|
KernelEvent:: |
private | property | The kernel in which this event was thrown. | |
KernelEvent:: |
private | property | The request the kernel is currently processing. | |
KernelEvent:: |
private | property | The request type the kernel is currently processing. One of HttpKernelInterface::MASTER_REQUEST and HttpKernelInterface::SUB_REQUEST. | |
KernelEvent:: |
public | function | Returns the kernel in which this event was thrown. | |
KernelEvent:: |
public | function | Returns the request the kernel is currently processing. | |
KernelEvent:: |
public | function | Returns the request type the kernel is currently processing. | |
KernelEvent:: |
public | function | Checks if this is a master request. |