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\HttpFoundation\Request;
15 use Symfony\Component\HttpFoundation\Response;
16 use Symfony\Component\HttpKernel\HttpKernelInterface;
19 * Allows to filter a Response object.
21 * You can call getResponse() to retrieve the current response. With
22 * setResponse() you can set a new response that will be returned to the
25 * @author Bernhard Schussek <bschussek@gmail.com>
27 class FilterResponseEvent extends KernelEvent
31 public function __construct(HttpKernelInterface $kernel, Request $request, $requestType, Response $response)
33 parent::__construct($kernel, $request, $requestType);
35 $this->setResponse($response);
39 * Returns the current response object.
43 public function getResponse()
45 return $this->response;
49 * Sets a new response object.
51 public function setResponse(Response $response)
53 $this->response = $response;