- WIP on ulmus-user mechanics updates
This commit is contained in:
1 parent
69382f912b
commit
af8b686e3b
9 files changed
+72
-27
No files matched your search
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Lean\Factory;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
interface HttpFactoryInterface
|
||||
{
|
||||
public static function createResponse(string $url, int $code = 302, array $headers = []) : ResponseInterface;
|
||||
public static function createRedirectResponse(string $url, int $code = 302, array $headers = []) : ResponseInterface;
|
||||
public static function createHtmlResponse(string $html, int $code = 200, array $headers = []) : ResponseInterface;
|
||||
public static function createTextResponse(string $text, int $code = 200, array $headers = []) : ResponseInterface;
|
||||
public static function createJsonResponse(mixed $data, int $code = 200, array $headers = []) : ResponseInterface;
|
||||
public static function createEmptyResponse(int $code = 204, array $headers = []) : ResponseInterface;
|
||||
public static function createPdfResponse(\Stringable|string $binary, int $code = 200, array $headers = []) : ResponseInterface;
|
||||
public static function createDownloadableResponse(string $data, string $filename, int $code = 200, array $headers = []) : ResponseInterface;
|
||||
public static function createImageResponse(string $data, int $code = 200, array $headers = []) : ResponseInterface;
|
||||
public static function createFileDownloadResponse(string $path, int $code = 200, array $headers = []) : ResponseInterface;
|
||||
}
|
||||
Reference in new issue
Block a user