aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/AppFramework/Http/TemplateResponse.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/AppFramework/Http/TemplateResponse.php')
-rw-r--r--lib/public/AppFramework/Http/TemplateResponse.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/public/AppFramework/Http/TemplateResponse.php b/lib/public/AppFramework/Http/TemplateResponse.php
index 48097674fdf..0364ba10e50 100644
--- a/lib/public/AppFramework/Http/TemplateResponse.php
+++ b/lib/public/AppFramework/Http/TemplateResponse.php
@@ -10,6 +10,7 @@
* @author Roeland Jago Douma <roeland@famdouma.nl>
* @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Thomas Tanghus <thomas@tanghus.net>
+ * @author Kate Döen <kate.doeen@nextcloud.com>
*
* @license AGPL-3.0
*
@@ -28,9 +29,15 @@
*/
namespace OCP\AppFramework\Http;
+use OCP\AppFramework\Http;
+
/**
* Response for a normal template
* @since 6.0.0
+ *
+ * @template S of int
+ * @template H of array<string, mixed>
+ * @template-extends Response<int, array<string, mixed>>
*/
class TemplateResponse extends Response {
/**
@@ -98,11 +105,12 @@ class TemplateResponse extends Response {
* @param array $params an array of parameters which should be passed to the
* template
* @param string $renderAs how the page should be rendered, defaults to user
+ * @param S $status
+ * @param H $headers
* @since 6.0.0 - parameters $params and $renderAs were added in 7.0.0
*/
- public function __construct($appName, $templateName, array $params = [],
- $renderAs = self::RENDER_AS_USER) {
- parent::__construct();
+ public function __construct(string $appName, string $templateName, array $params = [], string $renderAs = self::RENDER_AS_USER, int $status = Http::STATUS_OK, array $headers = []) {
+ parent::__construct($status, $headers);
$this->templateName = $templateName;
$this->appName = $appName;