aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKate <26026535+provokateurin@users.noreply.github.com>2025-06-03 14:00:12 +0200
committerGitHub <noreply@github.com>2025-06-03 14:00:12 +0200
commitf54592bf290f055e2d750f781059b0da35eb5d9e (patch)
tree9d44c4a4b87327a0de97207af74ced62d5cbcc4f
parentf25d66008b7af7291b78521708f76bc9da6f2365 (diff)
parentc3aa5316be2797184ea0be10c5a984a05f5592ae (diff)
downloadnextcloud-server-f54592bf290f055e2d750f781059b0da35eb5d9e.tar.gz
nextcloud-server-f54592bf290f055e2d750f781059b0da35eb5d9e.zip
Merge pull request #53283 from nextcloud/feat/requestheader/indirect-parameter
-rw-r--r--lib/public/AppFramework/Http/Attribute/RequestHeader.php24
1 files changed, 4 insertions, 20 deletions
diff --git a/lib/public/AppFramework/Http/Attribute/RequestHeader.php b/lib/public/AppFramework/Http/Attribute/RequestHeader.php
index c9327eec4c0..1d0fbbfa0c3 100644
--- a/lib/public/AppFramework/Http/Attribute/RequestHeader.php
+++ b/lib/public/AppFramework/Http/Attribute/RequestHeader.php
@@ -21,30 +21,14 @@ use Attribute;
#[Attribute(Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
class RequestHeader {
/**
- * @param string $name The name of the request header
- * @param string $description The description of the request header
+ * @param lowercase-string $name The name of the request header
+ * @param non-empty-string $description The description of the request header
+ * @param bool $indirect Allow indirect usage of the header for example in a middleware. Enabling this turns off the check which ensures that the header must be referenced in the controller method.
*/
public function __construct(
protected string $name,
protected string $description,
+ protected bool $indirect = false,
) {
}
-
- /**
- * @return string The name of the request header.
- *
- * @since 32.0.0
- */
- public function getName(): string {
- return $this->name;
- }
-
- /**
- * @return string The description of the request header.
- *
- * @since 32.0.0
- */
- public function getDescription(): string {
- return $this->description;
- }
}