diff options
author | Kate <26026535+provokateurin@users.noreply.github.com> | 2023-06-30 10:12:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-30 10:12:28 +0200 |
commit | 90a78d7caa796a8ff6a688253fd06aa176cd8bf8 (patch) | |
tree | 20e2e5194e3f780ceb9ed61bfbcdbc4df4de59c2 /lib/public/AppFramework/Http/ZipResponse.php | |
parent | 794d511774c28e6a8dc9d2a70d6968322140b70e (diff) | |
parent | b0001c6010840362355c181b831b4517ac19b8fc (diff) | |
download | nextcloud-server-90a78d7caa796a8ff6a688253fd06aa176cd8bf8.tar.gz nextcloud-server-90a78d7caa796a8ff6a688253fd06aa176cd8bf8.zip |
Merge pull request #38802 from nextcloud/feature/type-responses
Add types to responses
Diffstat (limited to 'lib/public/AppFramework/Http/ZipResponse.php')
-rw-r--r-- | lib/public/AppFramework/Http/ZipResponse.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/public/AppFramework/Http/ZipResponse.php b/lib/public/AppFramework/Http/ZipResponse.php index 23e9f1f7a94..cd7f71f858d 100644 --- a/lib/public/AppFramework/Http/ZipResponse.php +++ b/lib/public/AppFramework/Http/ZipResponse.php @@ -9,6 +9,7 @@ declare(strict_types=1); * @author Jakob Sack <mail@jakobsack.de> * @author Morris Jobke <hey@morrisjobke.de> * @author Roeland Jago Douma <roeland@famdouma.nl> + * @author Kate Döen <kate.doeen@nextcloud.com> * * @license GNU AGPL version 3 or any later version * @@ -29,12 +30,16 @@ declare(strict_types=1); namespace OCP\AppFramework\Http; use OC\Streamer; +use OCP\AppFramework\Http; use OCP\IRequest; /** * Public library to send several files in one zip archive. * * @since 15.0.0 + * @template S of int + * @template H of array<string, mixed> + * @template-extends Response<int, array<string, mixed>> */ class ZipResponse extends Response implements ICallbackResponse { /** @var array{internalName: string, resource: resource, size: int, time: int}[] Files to be added to the zip response */ @@ -44,10 +49,12 @@ class ZipResponse extends Response implements ICallbackResponse { private IRequest $request; /** + * @param S $status + * @param H $headers * @since 15.0.0 */ - public function __construct(IRequest $request, string $name = 'output') { - parent::__construct(); + public function __construct(IRequest $request, string $name = 'output', int $status = Http::STATUS_OK, array $headers = []) { + parent::__construct($status, $headers); $this->name = $name; $this->request = $request; |