Back to index

php5  5.3.10
php_filter.h
Go to the documentation of this file.
00001 /*
00002   +----------------------------------------------------------------------+
00003   | PHP Version 5                                                        |
00004   +----------------------------------------------------------------------+
00005   | Copyright (c) 1997-2012 The PHP Group                                |
00006   +----------------------------------------------------------------------+
00007   | This source file is subject to version 3.01 of the PHP license,      |
00008   | that is bundled with this package in the file LICENSE, and is        |
00009   | available through the world-wide-web at the following url:           |
00010   | http://www.php.net/license/3_01.txt                                  |
00011   | If you did not receive a copy of the PHP license and are unable to   |
00012   | obtain it through the world-wide-web, please send a note to          |
00013   | license@php.net so we can mail you a copy immediately.               |
00014   +----------------------------------------------------------------------+
00015   | Authors: Rasmus Lerdorf <rasmus@php.net>                             |
00016   |          Derick Rethans <derick@php.net>                             |
00017   +----------------------------------------------------------------------+
00018 */
00019 
00020 /* $Id: php_filter.h 321634 2012-01-01 13:15:04Z felipe $ */
00021 
00022 #ifndef PHP_FILTER_H
00023 #define PHP_FILTER_H
00024 
00025 #include "SAPI.h"
00026 #include "zend_API.h"
00027 #include "php.h"
00028 #include "php_ini.h"
00029 #include "ext/standard/info.h"
00030 #include "ext/standard/php_string.h"
00031 #include "ext/standard/html.h"
00032 #include "php_variables.h"
00033 
00034 extern zend_module_entry filter_module_entry;
00035 #define phpext_filter_ptr &filter_module_entry
00036 
00037 #ifdef ZTS
00038 #include "TSRM.h"
00039 #endif
00040 
00041 PHP_MINIT_FUNCTION(filter);
00042 PHP_MSHUTDOWN_FUNCTION(filter);
00043 PHP_RINIT_FUNCTION(filter);
00044 PHP_RSHUTDOWN_FUNCTION(filter);
00045 PHP_MINFO_FUNCTION(filter);
00046 
00047 PHP_FUNCTION(filter_input);
00048 PHP_FUNCTION(filter_var);
00049 PHP_FUNCTION(filter_input_array);
00050 PHP_FUNCTION(filter_var_array);
00051 PHP_FUNCTION(filter_list);
00052 PHP_FUNCTION(filter_has_var);
00053 PHP_FUNCTION(filter_id);
00054 
00055 ZEND_BEGIN_MODULE_GLOBALS(filter)
00056        zval *post_array;
00057        zval *get_array;
00058        zval *cookie_array;
00059        zval *env_array;
00060        zval *server_array;
00061        zval *session_array;
00062        long  default_filter;
00063        long  default_filter_flags;
00064 ZEND_END_MODULE_GLOBALS(filter)
00065 
00066 #ifdef ZTS
00067 #define IF_G(v) TSRMG(filter_globals_id, zend_filter_globals *, v)
00068 #else
00069 #define IF_G(v) (filter_globals.v)
00070 #endif
00071 
00072 
00073 #define PHP_INPUT_FILTER_PARAM_DECL zval *value, long flags, zval *option_array, char *charset TSRMLS_DC
00074 void php_filter_int(PHP_INPUT_FILTER_PARAM_DECL);
00075 void php_filter_boolean(PHP_INPUT_FILTER_PARAM_DECL);
00076 void php_filter_float(PHP_INPUT_FILTER_PARAM_DECL);
00077 void php_filter_validate_regexp(PHP_INPUT_FILTER_PARAM_DECL);
00078 void php_filter_validate_url(PHP_INPUT_FILTER_PARAM_DECL);
00079 void php_filter_validate_email(PHP_INPUT_FILTER_PARAM_DECL);
00080 void php_filter_validate_ip(PHP_INPUT_FILTER_PARAM_DECL);
00081 
00082 void php_filter_string(PHP_INPUT_FILTER_PARAM_DECL);
00083 void php_filter_encoded(PHP_INPUT_FILTER_PARAM_DECL);
00084 void php_filter_special_chars(PHP_INPUT_FILTER_PARAM_DECL);
00085 void php_filter_full_special_chars(PHP_INPUT_FILTER_PARAM_DECL);
00086 void php_filter_unsafe_raw(PHP_INPUT_FILTER_PARAM_DECL);
00087 void php_filter_email(PHP_INPUT_FILTER_PARAM_DECL);
00088 void php_filter_url(PHP_INPUT_FILTER_PARAM_DECL);
00089 void php_filter_number_int(PHP_INPUT_FILTER_PARAM_DECL);
00090 void php_filter_number_float(PHP_INPUT_FILTER_PARAM_DECL);
00091 void php_filter_magic_quotes(PHP_INPUT_FILTER_PARAM_DECL);
00092 
00093 void php_filter_callback(PHP_INPUT_FILTER_PARAM_DECL);
00094 
00095 #endif /* FILTER_H */
00096 
00097 /*
00098  * Local variables:
00099  * tab-width: 4
00100  * c-basic-offset: 4
00101  * indent-tabs-mode: t
00102  * End:
00103  */