You are here

private static function Uri::generateQueryString in Auth0 Single Sign On 8.2

Parameters

string $key:

string|null $value:

Return value

string

2 calls to Uri::generateQueryString()
Uri::withQueryValue in vendor/guzzlehttp/psr7/src/Uri.php
Creates a new URI with a specific query string value.
Uri::withQueryValues in vendor/guzzlehttp/psr7/src/Uri.php
Creates a new URI with multiple specific query string values.

File

vendor/guzzlehttp/psr7/src/Uri.php, line 667

Class

Uri
PSR-7 URI implementation.

Namespace

GuzzleHttp\Psr7

Code

private static function generateQueryString($key, $value) {

  // Query string separators ("=", "&") within the key or value need to be encoded
  // (while preventing double-encoding) before setting the query string. All other
  // chars that need percent-encoding will be encoded by withQuery().
  $queryString = strtr($key, self::$replaceQuery);
  if ($value !== null) {
    $queryString .= '=' . strtr($value, self::$replaceQuery);
  }
  return $queryString;
}