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\Bridge\PsrHttpMessage;
14 use Psr\Http\Message\ServerRequestInterface;
15 use Psr\Http\Message\ResponseInterface;
16 use Symfony\Component\HttpFoundation\Request;
17 use Symfony\Component\HttpFoundation\Response;
20 * Creates PSR HTTP Request and Response instances from Symfony ones.
22 * @author Kévin Dunglas <dunglas@gmail.com>
24 interface HttpMessageFactoryInterface
27 * Creates a PSR-7 Request instance from a Symfony one.
29 * @param Request $symfonyRequest
31 * @return ServerRequestInterface
33 public function createRequest(Request $symfonyRequest);
36 * Creates a PSR-7 Response instance from a Symfony one.
38 * @param Response $symfonyResponse
40 * @return ResponseInterface
42 public function createResponse(Response $symfonyResponse);