Methods summary
public
|
#
__construct( string[][]|string[]|string|esperecyan\url\URLSearchParams $init = '' )
Parameters
- $init
An array of two-element arrays with the first element the name and the second the value,
associative array, USVString, or URLSearchParams.
Link
|
public
|
#
append( string $name, string $value )
Appends a new name-value pair whose name is name and value is value, to the list of name-value pairs.
Appends a new name-value pair whose name is name and value is value, to the list of name-value pairs.
Parameters
- $name
- A USVString.
- $value
- A USVString.
Link
|
public
|
#
delete( string $name )
Removes all name-value pairs whose name is name.
Removes all name-value pairs whose name is name.
Parameters
Link
|
public
string|null
|
#
get( string $name )
Returns the value of the first name-value pair whose name is name, and null if there is no such pair.
Returns the value of the first name-value pair whose name is name, and null if there is no such pair.
Parameters
Returns
string|null A USVString or null.
Link
|
public
string[]
|
#
getAll( string $name )
Returns the values of all name-value pairs whose name is name, in list order, and the empty sequence otherwise.
Returns the values of all name-value pairs whose name is name, in list order, and the empty sequence otherwise.
Parameters
Returns
string[] An array of a USVString.
Link
|
public
boolean
|
#
has( string $name )
Returns true if there is a name-value pair whose name is name, and false otherwise.
Returns true if there is a name-value pair whose name is name, and false otherwise.
Parameters
Returns
boolean
Link
|
public
|
#
set( string $name, string $value )
If there are any name-value pairs whose name is name, set the value of the first such name-value pair to value and remove the others.
Otherwise, append a new name-value pair whose name is name and value is value, to the list of name-value pairs.
If there are any name-value pairs whose name is name, set the value of the first such name-value pair to value and remove the others.
Otherwise, append a new name-value pair whose name is name and value is value, to the list of name-value pairs.
Parameters
- $name
- A USVString.
- $value
- A USVString.
Link
|
public
|
#
sort( string $name,…, string $value,… )
Sorts all name-value pair by their names and comparing JavaScript strings (UTF-16).
Sorts all name-value pair by their names and comparing JavaScript strings (UTF-16).
Parameters
- $name,…
- A USVString.
- $value,…
- A USVString.
Link
|
public
|
#
getIterator( )
Uses
lib\URLSearchParamsIterator
Implementation of
IteratorAggregate::getIterator()
|
public
string
|
#
__toString( )
Returns the serialization of the URLSearchParams object's associated list of name-value pairs.
Returns the serialization of the URLSearchParams object's associated list of name-value pairs.
Returns
string A USVString.
Link
|