class FilterResponseEvent in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Event/FilterResponseEvent.php \Symfony\Component\HttpKernel\Event\FilterResponseEvent
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\Component\EventDispatcher\Event
- class \Symfony\Component\HttpKernel\Event\KernelEvent
- class \Symfony\Component\HttpKernel\Event\FilterResponseEvent
- class \Symfony\Component\HttpKernel\Event\KernelEvent
Expanded class hierarchy of FilterResponseEvent
30 files declare their use of FilterResponseEvent
- ActiveLinkResponseFilter.php in core/
lib/ Drupal/ Core/ EventSubscriber/ ActiveLinkResponseFilter.php - Contains \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter.
- AjaxResponseSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ AjaxResponseSubscriber.php - Contains \Drupal\Core\EventSubscriber\AjaxResponseSubscriber.
- AjaxResponseTest.php in core/
tests/ Drupal/ Tests/ Core/ Ajax/ AjaxResponseTest.php - Contains \Drupal\Tests\Core\Ajax\AjaxResponseTest.
- AnonymousUserResponseSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ AnonymousUserResponseSubscriber.php - Contains \Drupal\Core\EventSubscriber\AnonymousUserResponseSubscriber.
- ClientErrorResponseSubscriber.php in core/
lib/ Drupal/ Core/ EventSubscriber/ ClientErrorResponseSubscriber.php - Contains \Drupal\Core\EventSubscriber\ClientErrorResponseSubscriber.
File
- vendor/
symfony/ http-kernel/ Event/ FilterResponseEvent.php, line 27
Namespace
Symfony\Component\HttpKernel\EventView source
class FilterResponseEvent extends KernelEvent {
/**
* The current response object.
*
* @var Response
*/
private $response;
public function __construct(HttpKernelInterface $kernel, Request $request, $requestType, Response $response) {
parent::__construct($kernel, $request, $requestType);
$this
->setResponse($response);
}
/**
* Returns the current response object.
*
* @return Response
*/
public function getResponse() {
return $this->response;
}
/**
* Sets a new response object.
*
* @param Response $response
*/
public function setResponse(Response $response) {
$this->response = $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. | |
FilterResponseEvent:: |
private | property | The current response object. | |
FilterResponseEvent:: |
public | function | Returns the current response object. | |
FilterResponseEvent:: |
public | function | Sets a new response object. | |
FilterResponseEvent:: |
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. |