You are here

public function ServerRequest::withQueryParams in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/zendframework/zend-diactoros/src/ServerRequest.php \Zend\Diactoros\ServerRequest::withQueryParams()
  2. 8.0 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/ServerRequest.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\ServerRequest::withQueryParams()
Same name and namespace in other branches
  1. 8 vendor/symfony/psr-http-message-bridge/Tests/Fixtures/ServerRequest.php \Symfony\Bridge\PsrHttpMessage\Tests\Fixtures\ServerRequest::withQueryParams()

Return an instance with the specified query string arguments.

These values SHOULD remain immutable over the course of the incoming request. They MAY be injected during instantiation, such as from PHP's $_GET superglobal, or MAY be derived from some other value such as the URI. In cases where the arguments are parsed from the URI, the data MUST be compatible with what PHP's parse_str() would return for purposes of how duplicate query parameters are handled, and how nested sets are handled.

Setting query string arguments MUST NOT change the URI stored by the request, nor the values in the server params.

This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated query string arguments.

Parameters

array $query Array of query string arguments, typically from: $_GET.

Return value

self

Overrides ServerRequestInterface::withQueryParams

File

vendor/symfony/psr-http-message-bridge/Tests/Fixtures/ServerRequest.php, line 97

Class

ServerRequest
@author Kévin Dunglas <dunglas@gmail.com>

Namespace

Symfony\Bridge\PsrHttpMessage\Tests\Fixtures

Code

public function withQueryParams(array $query) {
  throw new \BadMethodCallException('Not implemented.');
}