summaryrefslogtreecommitdiff
path: root/ext/curl/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/curl/interface.c')
-rw-r--r--ext/curl/interface.c139
1 files changed, 120 insertions, 19 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index bf8b804f5c..f91bd58a70 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -181,27 +181,128 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
php_url_free(tmp_url); \
}
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_version, 0, 0, 0)
+ ZEND_ARG_INFO(0, version)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_init, 0, 0, 0)
+ ZEND_ARG_INFO(0, url)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_curl_copy_handle, 0)
+ ZEND_ARG_INFO(0, ch)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_curl_setopt, 0)
+ ZEND_ARG_INFO(0, ch)
+ ZEND_ARG_INFO(0, option)
+ ZEND_ARG_INFO(0, value)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_curl_setopt_array, 0)
+ ZEND_ARG_INFO(0, ch)
+ ZEND_ARG_ARRAY_INFO(0, options, 0)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_curl_exec, 0)
+ ZEND_ARG_INFO(0, ch)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_getinfo, 0, 0, 1)
+ ZEND_ARG_INFO(0, ch)
+ ZEND_ARG_INFO(0, option)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_curl_error, 0)
+ ZEND_ARG_INFO(0, ch)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_curl_errno, 0)
+ ZEND_ARG_INFO(0, ch)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_curl_close, 0)
+ ZEND_ARG_INFO(0, ch)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_init, 0)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_add_handle, 0)
+ ZEND_ARG_INFO(0, mh)
+ ZEND_ARG_INFO(0, ch)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_remove_handle, 0)
+ ZEND_ARG_INFO(0, mh)
+ ZEND_ARG_INFO(0, ch)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_multi_select, 0, 0, 1)
+ ZEND_ARG_INFO(0, mh)
+ ZEND_ARG_INFO(0, timeout)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_multi_exec, 0, 0, 1)
+ ZEND_ARG_INFO(0, mh)
+ ZEND_ARG_INFO(1, still_running)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_getcontent, 0)
+ ZEND_ARG_INFO(0, ch)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_multi_info_read, 0, 0, 1)
+ ZEND_ARG_INFO(0, mh)
+ ZEND_ARG_INFO(0, msgs_in_queue)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_close, 0)
+ ZEND_ARG_INFO(0, mh)
+ZEND_END_ARG_INFO()
+
+/* }}} */
+
/* {{{ curl_functions[]
*/
zend_function_entry curl_functions[] = {
- PHP_FE(curl_init, NULL)
- PHP_FE(curl_copy_handle, NULL)
- PHP_FE(curl_version, NULL)
- PHP_FE(curl_setopt, NULL)
- PHP_FE(curl_setopt_array, NULL)
- PHP_FE(curl_exec, NULL)
- PHP_FE(curl_getinfo, NULL)
- PHP_FE(curl_error, NULL)
- PHP_FE(curl_errno, NULL)
- PHP_FE(curl_close, NULL)
- PHP_FE(curl_multi_init, NULL)
- PHP_FE(curl_multi_add_handle, NULL)
- PHP_FE(curl_multi_remove_handle, NULL)
- PHP_FE(curl_multi_select, NULL)
- PHP_FE(curl_multi_exec, second_arg_force_ref)
- PHP_FE(curl_multi_getcontent, NULL)
- PHP_FE(curl_multi_info_read, NULL)
- PHP_FE(curl_multi_close, NULL)
+ PHP_FE(curl_init, arginfo_curl_init)
+ PHP_FE(curl_copy_handle, arginfo_curl_copy_handle)
+ PHP_FE(curl_version, arginfo_curl_version)
+ PHP_FE(curl_setopt, arginfo_curl_setopt)
+ PHP_FE(curl_setopt_array, arginfo_curl_setopt_array)
+ PHP_FE(curl_exec, arginfo_curl_exec)
+ PHP_FE(curl_getinfo, arginfo_curl_getinfo)
+ PHP_FE(curl_error, arginfo_curl_error)
+ PHP_FE(curl_errno, arginfo_curl_errno)
+ PHP_FE(curl_close, arginfo_curl_close)
+ PHP_FE(curl_multi_init, arginfo_curl_multi_init)
+ PHP_FE(curl_multi_add_handle, arginfo_curl_multi_add_handle)
+ PHP_FE(curl_multi_remove_handle, arginfo_curl_multi_remove_handle)
+ PHP_FE(curl_multi_select, arginfo_curl_multi_select)
+ PHP_FE(curl_multi_exec, arginfo_curl_multi_exec)
+ PHP_FE(curl_multi_getcontent, arginfo_curl_multi_getcontent)
+ PHP_FE(curl_multi_info_read, arginfo_curl_multi_info_read)
+ PHP_FE(curl_multi_close, arginfo_curl_multi_close)
{NULL, NULL, NULL}
};
/* }}} */
@@ -1519,7 +1620,7 @@ PHP_FUNCTION(curl_exec)
}
/* }}} */
-/* {{{ proto mixed curl_getinfo(resource ch, int opt)
+/* {{{ proto mixed curl_getinfo(resource ch [, int option])
Get information regarding a specific transfer */
PHP_FUNCTION(curl_getinfo)
{