You are here

public function ServerRequestInterface::withAttribute in Lockr 7.3

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

static

See also

getAttributes()

1 method overrides ServerRequestInterface::withAttribute()
ServerRequest::withAttribute in vendor/guzzlehttp/psr7/src/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\Message

Code

public function withAttribute($name, $value);