Method
Uri::withHost
Returns a copy of the URI with the host replaced; '' removes it.
Description#
public Uri::withHost(
$host
): UriInterfaceParameters#
- $host
Return values#
UriInterface
Errors / Exceptions#
| Exception | When |
|---|---|
InvalidArgumentException | When $host is not a string, or not a host name or IP address |
See also#
Psr\Http\Message\UriInterface::withHost