public function UriInterface::withQuery in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/psr/http-message/src/UriInterface.php \Psr\Http\Message\UriInterface::withQuery()
Return an instance with the specified query string.
This method MUST retain the state of the current instance, and return an instance that contains the specified query string.
Users can provide both encoded and decoded query characters. Implementations ensure the correct encoding as outlined in getQuery().
An empty query string value is equivalent to removing the query string.
Parameters
string $query The query string to use with the new instance.:
Return value
self A new instance with the specified query string.
Throws
\InvalidArgumentException for invalid query strings.
2 methods override UriInterface::withQuery()
- Uri::withQuery in vendor/
zendframework/ zend-diactoros/ src/ Uri.php - Return an instance with the specified query string.
- Uri::withQuery in vendor/
guzzlehttp/ psr7/ src/ Uri.php - Return an instance with the specified query string.
File
- vendor/
psr/ http-message/ src/ UriInterface.php, line 281
Class
- UriInterface
- Value object representing a URI.
Namespace
Psr\Http\MessageCode
public function withQuery($query);