This commit is contained in:
Dave Mc Nicoll committed 2023-11-27 13:03:19 -05:00
commit a9db9cd846
20 files changed
+125 -292

No files matched your search

+6
View File
@@ -4,10 +4,16 @@ namespace Lean\Factory;
use Laminas\Diactoros\Response\{EmptyResponse, HtmlResponse, JsonResponse, RedirectResponse, TextResponse};
use Lean\Response\{ DownloadResponse, ImageResponse, FileDownloadResponse, PdfResponse };
use Laminas\Diactoros\Response;
use Psr\Http\Message\ResponseInterface;
class HttpFactory
{
public static function createResponse(string $url, int $code = 302, array $headers = []) : ResponseInterface
{
return new Response($url, $code, $headers);
}
public static function createRedirectResponse(string $url, int $code = 302, array $headers = []) : ResponseInterface
{
return new RedirectResponse($url, $code, $headers);