mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00
- Implemented input_filters_list() function to return all supported filters.
This commit is contained in:
parent
b2633c34d5
commit
01520328e6
2 changed files with 15 additions and 1 deletions
|
@ -77,6 +77,7 @@ static unsigned int php_sapi_filter(int arg, char *var, char **val, unsigned int
|
||||||
*/
|
*/
|
||||||
function_entry filter_functions[] = {
|
function_entry filter_functions[] = {
|
||||||
PHP_FE(input_get, NULL)
|
PHP_FE(input_get, NULL)
|
||||||
|
PHP_FE(input_filters_list, NULL)
|
||||||
PHP_FE(filter_data, NULL)
|
PHP_FE(filter_data, NULL)
|
||||||
{NULL, NULL, NULL}
|
{NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
@ -507,6 +508,19 @@ PHP_FUNCTION(input_get)
|
||||||
}
|
}
|
||||||
/* }}} */
|
/* }}} */
|
||||||
|
|
||||||
|
/* {{{ proto input_filters_list()
|
||||||
|
* Returns a list of all supported filters */
|
||||||
|
PHP_FUNCTION(input_filters_list)
|
||||||
|
{
|
||||||
|
int i, size = sizeof(filter_list) / sizeof(filter_list_entry);
|
||||||
|
|
||||||
|
array_init(return_value);
|
||||||
|
for (i = 0; i < size; ++i) {
|
||||||
|
add_next_index_string(return_value, filter_list[i].name, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* }}} */
|
||||||
|
|
||||||
/* {{{ proto filter_data(mixed variable, int filter [, mixed filter_options [, string charset ]])
|
/* {{{ proto filter_data(mixed variable, int filter [, mixed filter_options [, string charset ]])
|
||||||
*/
|
*/
|
||||||
PHP_FUNCTION(filter_data)
|
PHP_FUNCTION(filter_data)
|
||||||
|
|
|
@ -49,7 +49,7 @@ PHP_RSHUTDOWN_FUNCTION(filter);
|
||||||
PHP_MINFO_FUNCTION(filter);
|
PHP_MINFO_FUNCTION(filter);
|
||||||
|
|
||||||
PHP_FUNCTION(input_get);
|
PHP_FUNCTION(input_get);
|
||||||
PHP_FUNCTION(input_get_array);
|
PHP_FUNCTION(input_filters_list);
|
||||||
PHP_FUNCTION(filter_data);
|
PHP_FUNCTION(filter_data);
|
||||||
|
|
||||||
ZEND_BEGIN_MODULE_GLOBALS(filter)
|
ZEND_BEGIN_MODULE_GLOBALS(filter)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue