Method
Uri::withUserInfo
Returns a copy of the URI with the user and password replaced.
Description#
public Uri::withUserInfo(
$user,
$password = null
): UriInterfaceParameters#
- $user
- $password = null
Return values#
UriInterface
Errors / Exceptions#
| Exception | When |
|---|---|
InvalidArgumentException | When the URI has no host and $user is not '' |
See also#
Psr\Http\Message\UriInterface::withUserInfo