wishthis/vendor/http-interop/http-factory-guzzle/src/ResponseFactory.php
2022-01-21 09:23:52 +01:00

15 lines
397 B
PHP

<?php
namespace Http\Factory\Guzzle;
use GuzzleHttp\Psr7\Response;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
class ResponseFactory implements ResponseFactoryInterface
{
public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface
{
return new Response($code, [], null, '1.1', $reasonPhrase);
}
}