mini\Http\Message\ServerRequest::withAttribute()
Method
public
Signature
public function withAttribute($name, $value): Psr\Http\Message\ServerRequestInterface
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$name |
mixed | required | Documentation missing |
$value |
mixed | required | Documentation missing |
Returns
Psr\Http\Message\ServerRequestInterface
Documentation
Return an instance with the specified derived request attribute.
This method allows setting a single derived request attribute as described in getAttributes().
This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated attribute.