4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\HttpKernel\Event;
14 use Symfony\Component\HttpKernel\HttpKernelInterface;
15 use Symfony\Component\HttpFoundation\Request;
16 use Symfony\Component\HttpFoundation\Response;
19 * Allows to execute logic after a response was sent.
21 * Since it's only triggered on master requests, the `getRequestType()` method
22 * will always return the value of `HttpKernelInterface::MASTER_REQUEST`.
24 * @author Jordi Boggiano <j.boggiano@seld.be>
26 class PostResponseEvent extends KernelEvent
30 public function __construct(HttpKernelInterface $kernel, Request $request, Response $response)
32 parent::__construct($kernel, $request, HttpKernelInterface::MASTER_REQUEST);
34 $this->response = $response;
38 * Returns the response for which this event was thrown.
42 public function getResponse()
44 return $this->response;