public function ServerRequestInterface::withAttribute in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/psr/http-message/src/ServerRequestInterface.php \Psr\Http\Message\ServerRequestInterface::withAttribute()
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.
Parameters
string $name The attribute name.:
mixed $value The value of the attribute.:
Return value
self
See also
getAttributes()
2 methods override ServerRequestInterface::withAttribute()
- ServerRequest::withAttribute in vendor/
zendframework/ zend-diactoros/ src/ ServerRequest.php - Return an instance with the specified derived request attribute.
- ServerRequest::withAttribute in vendor/
symfony/ psr-http-message-bridge/ Tests/ Fixtures/ ServerRequest.php - Return an instance with the specified derived request attribute.
File
- vendor/
psr/ http-message/ src/ ServerRequestInterface.php, line 244
Class
- ServerRequestInterface
- Representation of an incoming, server-side HTTP request.
Namespace
Psr\Http\MessageCode
public function withAttribute($name, $value);