class ResponseEvent
Allows to filter a Response object.
You can call getResponse() to retrieve the current response. With setResponse() you can set a new response that will be returned to the browser.
@author Bernhard Schussek <bschussek@gmail.com>
Hierarchy
- class \Symfony\Contracts\EventDispatcher\Event implements \Psr\EventDispatcher\StoppableEventInterface
- class \Symfony\Component\HttpKernel\Event\KernelEvent extends \Symfony\Contracts\EventDispatcher\Event
- class \Symfony\Component\HttpKernel\Event\ResponseEvent extends \Symfony\Component\HttpKernel\Event\KernelEvent
- class \Symfony\Component\HttpKernel\Event\KernelEvent extends \Symfony\Contracts\EventDispatcher\Event
Expanded class hierarchy of ResponseEvent
31 files declare their use of ResponseEvent
- AbstractSessionListener.php in vendor/
symfony/ http-kernel/ EventListener/ AbstractSessionListener.php - ActiveLinkResponseFilter.php in core/
lib/ Drupal/ Core/ EventSubscriber/ ActiveLinkResponseFilter.php - AjaxResponseSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ AjaxResponseSubscriber.php - AnonymousUserResponseSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ AnonymousUserResponseSubscriber.php - BigPipe.php in core/
modules/ big_pipe/ src/ Render/ BigPipe.php
File
-
vendor/
symfony/ http-kernel/ Event/ ResponseEvent.php, line 27
Namespace
Symfony\Component\HttpKernel\EventView source
final class ResponseEvent extends KernelEvent {
public function __construct(HttpKernelInterface $kernel, Request $request, int $requestType, Response $response) {
parent::__construct($kernel, $request, $requestType);
}
public function getResponse() : Response {
return $this->response;
}
public function setResponse(Response $response) : void {
$this->response = $response;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
Event::$propagationStopped | private | property | |||
Event::isPropagationStopped | public | function | Is propagation stopped? | Overrides StoppableEventInterface::isPropagationStopped | |
Event::stopPropagation | public | function | Stops the propagation of the event to further event listeners. | 1 | |
KernelEvent::getKernel | public | function | Returns the kernel in which this event was thrown. | ||
KernelEvent::getRequest | public | function | Returns the request the kernel is currently processing. | ||
KernelEvent::getRequestType | public | function | Returns the request type the kernel is currently processing. | ||
KernelEvent::isMainRequest | public | function | Checks if this is the main request. | ||
ResponseEvent::getResponse | public | function | |||
ResponseEvent::setResponse | public | function | |||
ResponseEvent::__construct | public | function | Overrides KernelEvent::__construct |