noalyss Version-9
|
manage the http input (get , post, request) and extract from an array More...
Public Member Functions | |
__toString () | |
_construct () | |
check_type ($p_name, $p_type) | |
Check the type of the value. More... | |
extract ( $p_name, $p_type="string", $p_default="") | |
Retrieve from $p_array,. More... | |
extract_variable ($p_string) | |
Extract variable name from an exception message. More... | |
get ($p_name, $p_type="string", $p_default="") | |
Retrieve from $_GET. More... | |
get_array () | |
get_empty () | |
get_value ($p_name, $p_type="string", $p_default="") | |
Retrieve from $this->array the variable. More... | |
post ($p_name, $p_type="string", $p_default="") | |
Retrieve from $_POST. More... | |
request ($p_name, $p_type="string", $p_default="") | |
Retrieve from $_REQUEST. More... | |
set_array ($array) | |
set_empty ($empty) | |
$empty replace the empty value More... | |
Private Attributes | |
$array | |
$empty | |
if empty that replace by $empty More... | |
manage the http input (get , post, request) and extract from an array
Definition at line 37 of file http_input.class.php.
HttpInput::__toString | ( | ) |
Definition at line 48 of file http_input.class.php.
HttpInput::_construct | ( | ) |
Definition at line 43 of file http_input.class.php.
HttpInput::check_type | ( | $p_name, | |
$p_type | |||
) |
Check the type of the value.
$p_name | name of the variable |
$p_type | type of the variable (number,string,text,date,array) |
Exception | if the variable doesn't exist or type incorrect |
Definition at line 84 of file http_input.class.php.
References $empty, $ex, $p_type, EXC_PARAM_TYPE, h, isDate(), and isNumber().
Referenced by get_value().
HttpInput::extract | ( | $p_name, | |
$p_type = "string" , |
|||
$p_default = "" |
|||
) |
Retrieve from $p_array,.
$p_name | name of the variable |
$p_type | type of the variable , opt. default string |
$p_default | default value is variable is not set |
Exception | if invalid |
Definition at line 268 of file http_input.class.php.
References $p_type, and get_value().
HttpInput::extract_variable | ( | $p_string | ) |
Extract variable name from an exception message.
If an exception is thrown then thanks this function it is possible to know what variable triggers the exception
type | $p_string |
Definition at line 295 of file http_input.class.php.
HttpInput::get | ( | $p_name, | |
$p_type = "string" , |
|||
$p_default = "" |
|||
) |
Retrieve from $_GET.
$p_name | name of the variable |
$p_type | type of the variable , opt. default string |
$p_default | default value is variable is not set |
Exception | if invalid |
Definition at line 195 of file http_input.class.php.
References $_GET, $p_type, and get_value().
HttpInput::get_array | ( | ) |
Definition at line 52 of file http_input.class.php.
References $array.
HttpInput::get_empty | ( | ) |
Definition at line 57 of file http_input.class.php.
References $empty.
HttpInput::get_value | ( | $p_name, | |
$p_type = "string" , |
|||
$p_default = "" |
|||
) |
Retrieve from $this->array the variable.
$p_name | name of the variable |
$p_type | type of the variable (number,string or text,date('dd.mm.yyyy'),array) |
$p_default | default value is variable |
Exception | if invalid |
Definition at line 156 of file http_input.class.php.
References $e, $p_type, check_type(), and EXC_PARAM_VALUE.
Referenced by extract(), get(), post(), and request().
HttpInput::post | ( | $p_name, | |
$p_type = "string" , |
|||
$p_default = "" |
|||
) |
Retrieve from $_POST.
string | $p_name | name of the variable |
$p_type | type of the variable , opt. default string | |
$p_default | default value is variable is not set |
Exception | if invalid |
Definition at line 220 of file http_input.class.php.
References $_POST, $p_type, and get_value().
HttpInput::request | ( | $p_name, | |
$p_type = "string" , |
|||
$p_default = "" |
|||
) |
Retrieve from $_REQUEST.
$p_name | string name of the variable |
$p_type | string type of the variable , opt. default string |
$p_default | string default value is variable is not set |
Exception | if invalid |
Definition at line 244 of file http_input.class.php.
References $_REQUEST, $p_type, and get_value().
HttpInput::set_array | ( | $array | ) |
Definition at line 62 of file http_input.class.php.
References $array.
HttpInput::set_empty | ( | $empty | ) |
$empty replace the empty value
Definition at line 71 of file http_input.class.php.
References $empty.
|
private |
Definition at line 40 of file http_input.class.php.
Referenced by get_array(), and set_array().
|
private |
if empty that replace by $empty
Definition at line 41 of file http_input.class.php.
Referenced by check_type(), get_empty(), and set_empty().