Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
GuzzleHttp\Psr7\Query Class Reference

Static Public Member Functions

static build (array $params, $encoding=PHP_QUERY_RFC3986, bool $treatBoolsAsInts=true)
 Build a query string from an array of key value pairs.
 
static parse (string $str, $urlEncoding=true)
 

Member Function Documentation

◆ build()

static GuzzleHttp\Psr7\Query::build ( array $params,
$encoding = PHP_QUERY_RFC3986,
bool $treatBoolsAsInts = true )
static

Build a query string from an array of key value pairs.

This function can use the return value of parse() to build a query string. This function does not modify the provided keys when an array is encountered (like http_build_query() would).

Parameters
array$paramsQuery string parameters.
int | false$encodingSet to false to not encode, PHP_QUERY_RFC3986 to encode using RFC3986, or PHP_QUERY_RFC1738 to encode using RFC1738.
bool$treatBoolsAsIntsSet to true to encode as 0/1, and false as false/true.

The documentation for this class was generated from the following file: