X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_params.h;h=716cba8cc478731d42a8b3a302749398e213699b;hp=487cfa4bdcaba35c85e77096cf39bfb1fa36aaf0;hb=7b028d0cbb030f9610084314f67b77907d8474a2;hpb=cfd6f56fae6192e762dd9054b91cc17672859f9e diff --git a/php_http_params.h b/php_http_params.h index 487cfa4..716cba8 100644 --- a/php_http_params.h +++ b/php_http_params.h @@ -18,21 +18,31 @@ typedef struct php_http_params_token { size_t len; } php_http_params_token_t; +#define PHP_HTTP_PARAMS_RAW 0x00 +#define PHP_HTTP_PARAMS_DEFAULT 0x01 +#define PHP_HTTP_PARAMS_URLENCODED 0x04 +#define PHP_HTTP_PARAMS_DIMENSION 0x08 +#define PHP_HTTP_PARAMS_QUERY (PHP_HTTP_PARAMS_URLENCODED|PHP_HTTP_PARAMS_DIMENSION) + typedef struct php_http_params_opts { php_http_params_token_t input; php_http_params_token_t **param; php_http_params_token_t **arg; php_http_params_token_t **val; + zval *defval; + unsigned flags; } php_http_params_opts_t; PHP_HTTP_API php_http_params_opts_t *php_http_params_opts_default_get(php_http_params_opts_t *opts); PHP_HTTP_API HashTable *php_http_params_parse(HashTable *params, const php_http_params_opts_t *opts TSRMLS_DC); -PHP_HTTP_API php_http_buffer_t *php_http_params_to_string(php_http_buffer_t *buf, HashTable *params, const char *pss, size_t psl, const char *ass, size_t asl, const char *vss, size_t vsl TSRMLS_DC); +PHP_HTTP_API php_http_buffer_t *php_http_params_to_string(php_http_buffer_t *buf, HashTable *params, const char *pss, size_t psl, const char *ass, size_t asl, const char *vss, size_t vsl, unsigned flags TSRMLS_DC); + +PHP_HTTP_API php_http_params_token_t **php_http_params_separator_init(zval *zv TSRMLS_DC); +PHP_HTTP_API void php_http_params_separator_free(php_http_params_token_t **separator); typedef php_http_object_t php_http_params_object_t; -extern zend_class_entry *php_http_params_class_entry; -extern zend_function_entry php_http_params_method_entry[]; +zend_class_entry *php_http_params_get_class_entry(void); PHP_MINIT_FUNCTION(http_params);