aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/AppFramework/Http/ZipResponse.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/AppFramework/Http/ZipResponse.php')
-rw-r--r--lib/public/AppFramework/Http/ZipResponse.php11
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;