ServerRequest::withAttribute( $attribute,  $value ): static

In this article

Return

static

Source

public function withAttribute($attribute, $value): ServerRequestInterface
{
    if (!\is_string($attribute)) {
        throw new \InvalidArgumentException('Attribute name must be a string');
    }
    $new = clone $this;
    $new->attributes[$attribute] = $value;
    return $new;
}

User Contributed Notes

You must log in before being able to contribute a note or feedback.