Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Request.php

function Request::normalizeQueryString

Normalizes a query string.

It builds a normalized query string, where keys/value pairs are alphabetized, have consistent escaping and unneeded delimiters are removed.

2 calls to Request::normalizeQueryString()
Request::getQueryString in vendor/symfony/http-foundation/Request.php
Generates the normalized query string for the Request.
Request::overrideGlobals in vendor/symfony/http-foundation/Request.php
Overrides the PHP global variables according to this request instance.

File

vendor/symfony/http-foundation/Request.php, line 609

Class

Request
Request represents an HTTP request.

Namespace

Symfony\Component\HttpFoundation

Code

public static function normalizeQueryString(?string $qs) : string {
    if ('' === ($qs ?? '')) {
        return '';
    }
    $qs = HeaderUtils::parseQuery($qs);
    ksort($qs);
    return http_build_query($qs, '', '&', \PHP_QUERY_RFC3986);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal