WordPress\AiClientDependencies\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.
Method of the class: ServerRequestInterface{}
No Hooks.
Returns
static.
Usage
$ServerRequestInterface = new ServerRequestInterface(); $ServerRequestInterface->withAttribute( $name, $value ): ServerRequestInterface;
- $name(string) (required)
- The attribute name.
- $value(mixed) (required)
- The value of the attribute.
Notes
- See: getAttributes()
ServerRequestInterface::withAttribute() ServerRequestInterface::withAttribute code WP 7.0
public function withAttribute(string $name, $value): ServerRequestInterface;