- Fix for HttpFactory (more to come)
This commit is contained in:
parent
16cd95abe2
commit
2cb911ea6f
|
@ -33,9 +33,9 @@ class HttpFactory
|
||||||
return new EmptyResponse($code, $headers);
|
return new EmptyResponse($code, $headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function createPdfResponse(string $binary, int $code = 200, array $headers = []) : ResponseInterface
|
public static function createPdfResponse(\Stringable $binary, int $code = 200, array $headers = []) : ResponseInterface
|
||||||
{
|
{
|
||||||
return new PdfResponse($binary, $code, $headers);
|
return new PdfResponse((string) $binary, $code, $headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function createDownloadableResponse(string $data, string $filename, int $code = 200, array $headers = []) : ResponseInterface
|
public static function createDownloadableResponse(string $data, string $filename, int $code = 200, array $headers = []) : ResponseInterface
|
||||||
|
@ -52,4 +52,4 @@ class HttpFactory
|
||||||
{
|
{
|
||||||
return new FileDownloadResponse($path, $code, $headers);
|
return new FileDownloadResponse($path, $code, $headers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue