|
noalyss Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
|
manage the http input (get , post, request) and extract from an array More...
Collaboration diagram for HttpInput:Public Member Functions | |
| __toString () | |
| _construct () | |
| check_type ($p_name, $p_type) | |
| Check the type of the value. | |
| extract ( $p_name, $p_type="string", $p_default="") | |
| Retrieve from $p_array,. | |
| extract_variable ($p_string) | |
| Extract variable name from an exception message. | |
| get ($p_name, $p_type="string", $p_default="") | |
| Retrieve from $_GET. | |
| get_array () | |
| get_empty () | |
| get_value ($p_name, $p_type="string", $p_default="") | |
| Retrieve from $this->array the variable. | |
| post ($p_name, $p_type="string", $p_default="") | |
| Retrieve from $_POST. | |
| request ($p_name, $p_type="string", $p_default="") | |
| Retrieve from $_REQUEST. | |
| set_array ($array) | |
| set_empty ($empty) | |
| $empty replace the empty value | |
Private Attributes | |
| $array | |
| $empty | |
| if empty that replace by $empty | |
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 | (string) type of the variable (number,string,text,date,array,raw) |
| 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().
Here is the call graph for this function:| 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().
Here is the call graph for this function:| 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().
Here is the call graph for this function:| 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().
Here is the call graph for this function:| 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().
Here is the call graph for this function:| 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().
Here is the call graph for this function:| 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().