Extension:PhpTags Functions/Functions/Useful/WebRequest

The WebRequest class is wrapper of original WebRequest class that which encapsulates getting at data passed in the URL or via a POSTed form, handling remove of "magic quotes" slashes, stripping illegal input characters and normalizing Unicode sequences.
 * Parser's cache will be disabled on page if the WebRequest class used

getArray

 * Description

Fetch an array from the input or return $default if it's not set. If source was scalar, will return an array with a single element. If no source and no default, returns NULL.

getBool

 * Description

Fetch a boolean value from the input or return $default if not set. Guaranteed to return true or false, with normal PHP semantics for boolean interpretation of strings.

getCheck

 * Description

Return true if the named value is set in the input, whatever that value is (even "0"). Return false if the named value is not set. Example use is checking for the presence of check boxes in forms.

getCookie

 * Description

Get a cookie from the $_COOKIE jar.
 * This function always use  prefix with $key

getInt

 * Description

Fetch an integer value from the input or return $default if not set. Guaranteed to return an integer; non-numeric input will typically return 0.

getText

 * Description

Fetch a text string from the given array or return $default if it's not set. Carriage returns are stripped from the text, and with some language modules there is an input transliteration applied. This should generally be used for form " " and " " fields. Used for user-supplied freeform text input.

getVal

 * Description

Fetch a scalar from the input or return $default if it's not set. Returns a string. Arrays are discarded. Useful for non-freeform text inputs (e.g. predefined internal text keys selected by a drop-down menu). For freeform input, see getText.

getValues

 * Description

Extracts the given named values into an array. If no arguments are given, returns all input values.

wasPosted

 * Description

Returns true if the present request was reached by a POST operation, false otherwise (GET or HEAD).