mdref.json config
[mdref/mdref-http] / http / QueryString / get.md
1 # mixed http\QueryString::get([string $name = NULL[, mixed $type = NULL[, mixed $defval = NULL[, bool $delete = false]]]])
2
3 Retrieve an querystring value.
4
5 See http\QueryString::TYPE_* constants.
6
7 ## Params:
8
9 * Optional string $name = NULL
10 The key to retrieve the value for.
11 * Optional mixed $type = NULL
12 The type to cast the value to. See http\QueryString::TYPE_* constants.
13 * Optional mixed $defval = NULL
14 The default value to return if the key $name does not exist.
15 * Optional bool $delete = false
16 Whether to delete the entry from the querystring after retrieval.
17
18
19 ## Returns:
20
21 * http\QueryString, if called without arguments.
22 * string, the whole querystring if $name is of zero length.
23 * mixed, $defval if the key $name does not exist.
24 * mixed, the querystring value cast to $type if $type was specified and the key $name exists.
25 * string, the querystring value if the key $name exists and $type is not specified or equals http\QueryString::TYPE_STRING.