class GetResponseEvent in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Event/GetResponseEvent.php \Symfony\Component\HttpKernel\Event\GetResponseEvent
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.
@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\KernelEvent
Expanded class hierarchy of GetResponseEvent
30 files declare their use of GetResponseEvent
- AddRequestFormatsListener.php in vendor/
symfony/ http-kernel/ EventListener/ AddRequestFormatsListener.php - AjaxResponseSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ AjaxResponseSubscriber.php - Contains \Drupal\Core\EventSubscriber\AjaxResponseSubscriber.
- AuthenticationSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ AuthenticationSubscriber.php - Contains \Drupal\Core\EventSubscriber\AuthenticationSubscriber.
- ContentControllerSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ ContentControllerSubscriber.php - Contains \Drupal\Core\EventSubscriber\ContentControllerSubscriber.
- DynamicPageCacheSubscriber.php in core/
modules/ dynamic_page_cache/ src/ EventSubscriber/ DynamicPageCacheSubscriber.php - Contains \Drupal\dynamic_page_cache\EventSubscriber\DynamicPageCacheSubscriber.
File
- vendor/
symfony/ http-kernel/ Event/ GetResponseEvent.php, line 25
Namespace
Symfony\Component\HttpKernel\EventView source
class GetResponseEvent extends KernelEvent {
/**
* The response object.
*
* @var Response
*/
private $response;
/**
* Returns the response object.
*
* @return Response
*/
public function getResponse() {
return $this->response;
}
/**
* Sets a response and stops event propagation.
*
* @param Response $response
*/
public function setResponse(Response $response) {
$this->response = $response;
$this
->stopPropagation();
}
/**
* Returns whether a response was set.
*
* @return bool Whether a response was set
*/
public function hasResponse() {
return null !== $this->response;
}
}
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. | |
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. | |
KernelEvent:: |
public | function | 4 |