RequestHeader
in package
This attribute allows documenting request headers and is primarily intended for OpenAPI documentation.
It should be added whenever you use a request header in a controller method, in order to properly describe the header and its functionality. There are no checks that ensure the header is set, so you will still need to do this yourself in the controller method.
Tags
Attributes
- #[Attribute]
- \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE
Table of Contents
Properties
- $description : string
- $name : string
Methods
- __construct() : mixed
- getDescription() : string
- getName() : string
Properties
$description
protected
string
$description
$name
protected
string
$name
Methods
__construct()
public
__construct(string $name, string $description) : mixed
Parameters
- $name : string
-
The name of the request header
- $description : string
-
The description of the request header
getDescription()
public
getDescription() : string
Tags
Return values
string —The description of the request header.
getName()
public
getName() : string
Tags
Return values
string —The name of the request header.