WIP on liteing the framework

This commit is contained in:
mcndave committed 2023-11-17 22:05:05 -05:00
1 parent bc55a2ab89
commit 9b795b857a
7 files changed
+36 -67

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);