for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
/*
* This file is part of Biurad opensource projects.
*
* @copyright 2019 Biurad Group (https://biurad.com/)
* @license https://opensource.org/licenses/BSD-3-Clause License
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Flange\Event;
use Flange\Application;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
/**
* 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 Divine Niiquaye Ibok <[email protected]>
final class ResponseEvent extends KernelEvent
{
private Response $response;
public function __construct(Application $app, Request $request, Response $response)
parent::__construct($app, $request);
$this->setResponse($response);
}
public function getResponse(): Response
return $this->response;
public function setResponse(Response $response): void
$this->response = $response;