Merge branch 'master' of https://git.mcnd.ca/mcndave/lean
This commit is contained in:
commit
a9db9cd846
20 files changed
+125
-292
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user