class PostResponseEvent

Allows to execute logic after a response was sent

@author Jordi Boggiano <j.boggiano@seld.be>

Hierarchy

Expanded class hierarchy of PostResponseEvent

5 files declare their use of PostResponseEvent
HttpKernel.php in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/HttpKernel.php
KernelDestructionSubscriber.php in drupal/core/lib/Drupal/Core/EventSubscriber/KernelDestructionSubscriber.php
Contains \Drupal\Core\EventSubscriber\KernelDestructionSubscriber.
PathSubscriber.php in drupal/core/lib/Drupal/Core/EventSubscriber/PathSubscriber.php
Definition of Drupal\Core\EventSubscriber\PathSubscriber.
RequestCloseSubscriber.php in drupal/core/lib/Drupal/Core/EventSubscriber/RequestCloseSubscriber.php
Definition of Drupal\Core\EventSubscriber\RequestCloseSubscriber.
ServiceDestructionTest.php in drupal/core/modules/system/lib/Drupal/system/Tests/DrupalKernel/ServiceDestructionTest.php
Contains \Drupal\system\Tests\DrupalKernel\ServiceDestructionTest.

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Event/PostResponseEvent.php, line 24

Namespace

Symfony\Component\HttpKernel\Event
View source
class PostResponseEvent extends Event {

  /**
   * The kernel in which this event was thrown
   * @var HttpKernelInterface
   */
  private $kernel;
  private $request;
  private $response;
  public function __construct(HttpKernelInterface $kernel, Request $request, Response $response) {
    $this->kernel = $kernel;
    $this->request = $request;
    $this->response = $response;
  }

  /**
   * Returns the kernel in which this event was thrown.
   *
   * @return HttpKernelInterface
   */
  public function getKernel() {
    return $this->kernel;
  }

  /**
   * Returns the request for which this event was thrown.
   *
   * @return Request
   */
  public function getRequest() {
    return $this->request;
  }

  /**
   * Returns the response for which this event was thrown.
   *
   * @return Response
   */
  public function getResponse() {
    return $this->response;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Event::$dispatcher private property
Event::$name private property
Event::$propagationStopped private property
Event::getDispatcher public function Returns the EventDispatcher that dispatches this Event
Event::getName public function Gets the event's name.
Event::isPropagationStopped public function Returns whether further event listeners should be triggered.
Event::setDispatcher public function Stores the EventDispatcher that dispatches this Event
Event::setName public function Sets the event's name property.
Event::stopPropagation public function Stops the propagation of the event to further event listeners.
PostResponseEvent::$kernel private property The kernel in which this event was thrown
PostResponseEvent::$request private property
PostResponseEvent::$response private property
PostResponseEvent::getKernel public function Returns the kernel in which this event was thrown.
PostResponseEvent::getRequest public function Returns the request for which this event was thrown.
PostResponseEvent::getResponse public function Returns the response for which this event was thrown.
PostResponseEvent::__construct public function