QueryString
class QueryString implements Serializable, ArrayAccess, IteratorAggregate (View source)
The http\QueryString class provides versatile facilities to retrieve, use and manipulate query strings and form data.
Constants
TYPE_BOOL |
Cast requested value to bool. |
TYPE_INT |
Cast requested value to int. |
TYPE_FLOAT |
Cast requested value to float. |
TYPE_STRING |
Cast requested value to string. |
TYPE_ARRAY |
Cast requested value to an array. |
TYPE_OBJECT |
Cast requested value to an object. |
Methods
Create an independent querystring instance.
Get the string representation of the querystring (x-www-form-urlencoded).
Retrieve an querystring value.
Retrieve an array value with at offset $name.
Retrieve a boolean value at offset $name.
Retrieve a float value at offset $name.
Retrieve the global querystring instance referencing $_GET.
Retrieve a int value at offset $name.
Implements IteratorAggregate.
Retrieve a object value with at offset $name.
Retrieve a string value with at offset $name.
Set additional $params to a clone of this instance.
Implements ArrayAccess.
Implements ArrayAccess.
Implements ArrayAccess.
Implements ArrayAccess.
Implements Serializable.
Set additional querystring entries.
Simply returns http\QueryString::$queryArray.
Get the string representation of the querystring (x-www-form-urlencoded).
Implements Serializable.
Translate character encodings of the querystring with ext/iconv.
Details
__construct(mixed $params = null)
Create an independent querystring instance.
string
__toString()
Get the string representation of the querystring (x-www-form-urlencoded).
QueryString|string|mixed
get(string $name = null, mixed $type = null, mixed $defval = null, bool $delete = false)
Retrieve an querystring value.
See http\QueryString::TYPE_* constants.
array|mixed
getArray(string $name, mixed $defval = null, bool $delete = false)
Retrieve an array value with at offset $name.
bool|mixed
getBool(string $name, mixed $defval = null, bool $delete = false)
Retrieve a boolean value at offset $name.
float|mixed
getFloat(string $name, mixed $defval = null, bool $delete = false)
Retrieve a float value at offset $name.
QueryString
getGlobalInstance()
Retrieve the global querystring instance referencing $_GET.
int|mixed
getInt(string $name, mixed $defval = null, bool $delete = false)
Retrieve a int value at offset $name.
Traversable
getIterator()
Implements IteratorAggregate.
object|mixed
getObject(string $name, mixed $defval = null, bool $delete = false)
Retrieve a object value with at offset $name.
string|mixed
getString(string $name, mixed $defval = null, bool $delete = false)
Retrieve a string value with at offset $name.
QueryString
mod(mixed $params = null)
Set additional $params to a clone of this instance.
See http\QueryString::set().
NOTE: This method returns a clone (copy) of this instance.
bool
offsetExists(string $name)
Implements ArrayAccess.
mixed
offsetGet(TKey $offset)
Implements ArrayAccess.
void
offsetSet(string $name, mixed $data)
Implements ArrayAccess.
void
offsetUnset(string $name)
Implements ArrayAccess.
string|null
serialize()
Implements Serializable.
See http\QueryString::toString().
QueryString
set(mixed $params)
Set additional querystring entries.
array
toArray()
Simply returns http\QueryString::$queryArray.
string
toString()
Get the string representation of the querystring (x-www-form-urlencoded).
void
unserialize(string $serialized)
Implements Serializable.
QueryString
xlate(string $from_enc, string $to_enc)
Translate character encodings of the querystring with ext/iconv.
NOTE: This method is only available when ext/iconv support was enabled at build time.