let the ctor honor the options array too
[m6w6/ext-http] / php_http_params.h
1 /*
2 +--------------------------------------------------------------------+
3 | PECL :: http |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
11 */
12
13 #ifndef PHP_HTTP_PARAMS_H
14 #define PHP_HTTP_PARAMS_H
15
16 typedef struct php_http_params_token {
17 char *str;
18 size_t len;
19 } php_http_params_token_t;
20
21 typedef struct php_http_params_opts {
22 php_http_params_token_t input;
23 php_http_params_token_t **param;
24 php_http_params_token_t **arg;
25 php_http_params_token_t **val;
26 } php_http_params_opts_t;
27
28 PHP_HTTP_API php_http_params_opts_t *php_http_params_opts_default_get(php_http_params_opts_t *opts);
29 PHP_HTTP_API HashTable *php_http_params_parse(HashTable *params, const php_http_params_opts_t *opts TSRMLS_DC);
30 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);
31
32 typedef php_http_object_t php_http_params_object_t;
33
34 extern zend_class_entry *php_http_params_class_entry;
35 extern zend_function_entry php_http_params_method_entry[];
36
37 PHP_MINIT_FUNCTION(http_params);
38
39 #define php_http_params_object_new php_http_object_new
40 #define php_http_params_object_new_ex php_http_object_new_ex
41
42 PHP_METHOD(HttpParams, __construct);
43 PHP_METHOD(HttpParams, toString);
44 PHP_METHOD(HttpParams, toArray);
45 PHP_METHOD(HttpParams, offsetExists);
46 PHP_METHOD(HttpParams, offsetUnset);
47 PHP_METHOD(HttpParams, offsetSet);
48 PHP_METHOD(HttpParams, offsetGet);
49
50 #endif
51
52 /*
53 * Local variables:
54 * tab-width: 4
55 * c-basic-offset: 4
56 * End:
57 * vim600: noet sw=4 ts=4 fdm=marker
58 * vim<600: noet sw=4 ts=4
59 */
60