| [ Index ] |
PHP Cross Reference of MantisBT |
[Source view] [Print] [Project Stats]
GPC API Provides sanitisation and type conversion of user supplied data through HTTP GET, HTTP POST and cookies.
| Copyright: | Copyright (C) 2000 - 2002 Kenzaburo Ito - kenito@300baud.org |
| Copyright: | Copyright (C) 2002 - 2011 MantisBT Team - mantisbt-dev@lists.sourceforge.net |
| File Size: | 493 lines (15 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| gpc_get( $p_var_name, $p_default = null ) X-Ref |
| GET, POST, and Cookie API --------------- Retrieve a GPC variable. If the variable is not set, the default is returned. If magic_quotes_gpc is on, slashes will be stripped from the value before being returned. You may pass in any variable as a default (including null) but if you pass in *no* default then an error will be triggered if the field cannot be found param: string return: null |
| gpc_isset( $p_var_name ) X-Ref |
param: string $p_var_name return: bool |
| gpc_get_string( $p_var_name, $p_default = null ) X-Ref |
| Retrieve a string GPC variable. Uses gpc_get(). If you pass in *no* default, an error will be triggered if the variable does not exist param: string $p_var_name param: string $p_default (optional) return: string|null |
| gpc_get_int( $p_var_name, $p_default = null ) X-Ref |
| Retrieve an integer GPC variable. Uses gpc_get(). If you pass in *no* default, an error will be triggered if the variable does not exist param: string $p_var_name param: int $p_default (optional) return: int|null |
| gpc_get_bool( $p_var_name, $p_default = false ) X-Ref |
| Retrieve a boolean GPC variable. Uses gpc_get(). If you pass in *no* default, false will be used param: string $p_var_name param: bool $p_default (optional) return: bool|null |
| gpc_isset_custom_field( $p_var_name, $p_custom_field_type ) X-Ref |
| see if a custom field variable is set. Uses gpc_isset(). param: string $p_var_name param: int $p_custom_field_type return: bool |
| gpc_get_custom_field( $p_var_name, $p_custom_field_type, $p_default = null ) X-Ref |
| Retrieve a custom field variable. Uses gpc_get(). If you pass in *no* default, an error will be triggered if the variable does not exist param: string $p_var_name param: int $p_custom_field_Type param: mixed $p_default return: string |
| gpc_get_string_array( $p_var_name, $p_default = null ) X-Ref |
| Retrieve a string array GPC variable. Uses gpc_get(). If you pass in *no* default, an error will be triggered if the variable does not exist param: string $p_var_name param: array $p_default return: array |
| gpc_get_int_array( $p_var_name, $p_default = null ) X-Ref |
| Retrieve an integer array GPC variable. Uses gpc_get(). If you pass in *no* default, an error will be triggered if the variable does not exist param: string $p_var_name param: array $p_default return: array |
| gpc_get_bool_array( $p_var_name, $p_default = null ) X-Ref |
| Retrieve a boolean array GPC variable. Uses gpc_get(). If you pass in *no* default, an error will be triggered if the variable does not exist. param: string $p_var_name param: string $p_default return: array |
| gpc_get_cookie( $p_var_name, $p_default = null ) X-Ref |
| Retrieve a cookie variable You may pass in any variable as a default (including null) but if you pass in *no* default then an error will be triggered if the cookie cannot be found param: string $p_var_name param: string $p_default return: string |
| gpc_set_cookie( $p_name, $p_value, $p_expire = false, $p_path = null, $p_domain = null, $p_httponly = true ) X-Ref |
| Set a cookie variable If $p_expire is false instead of a number, the cookie will expire when the browser is closed; if it is true, the default time from the config file will be used. If $p_path or $p_domain are omitted, defaults are used. Set $p_httponly to false if client-side Javascript needs to read/write the cookie. Otherwise it is safe to leave this value unspecified, as the default value is true. param: string $p_name param: string $p_value param: bool $p_expire default false param: string $p_path default null param: string $p_domain default null param: bool $p_httponly default true return: bool - true on success, false on failure |
| gpc_clear_cookie( $p_name, $p_path = null, $p_domain = null ) X-Ref |
| Clear a cookie variable param: string $p_name param: string $p_path param: string $p_domain return: bool |
| gpc_get_file( $p_var_name, $p_default = null ) X-Ref |
| Retrieve a file variable You may pass in any variable as a default (including null) but if you pass in *no* default then an error will be triggered if the file cannot be found param: string $p_var_name param: mixed $p_file return: mixed |
| gpc_make_array( $p_var_name ) X-Ref |
| Convert a POST/GET parameter to an array if it is not already one. param: string $p_var_name - The name of the parameter return: null no return value. The $_POST/$_GET are updated as appropriate. |
| gpc_string_to_bool( $p_string ) X-Ref |
| Convert a string to a bool param: string $p_string return: bool |
| gpc_strip_slashes( $p_var ) X-Ref |
| Strip slashes if necessary (supports arrays) param: mixed $p_var return: mixed |
| Generated: Thu Jul 28 15:48:31 2011 | Cross-referenced by PHPXref 0.7 |