Method
Uri::withScheme
Returns a copy of the URI with the scheme replaced.
Description#
public Uri::withScheme(
$scheme
): UriInterfaceParameters#
- $scheme
Return values#
UriInterface
Errors / Exceptions#
| Exception | When |
|---|---|
InvalidArgumentException | When the scheme does not start with a letter or has characters other than letters, digits, '+', '-' and '.' |
See also#
Psr\Http\Message\UriInterface::withScheme