X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_client.c;h=1f4e09a4dc4c10268894c6129564d17e740af87f;hp=c307221f0f0bf98f82b5d4ebde43dd6f13d066f5;hb=0b83632b2b0a03eeca090f993259ccd95ab646fb;hpb=f753226f1f45e10ef3916256ec1bc0416c8644a8 diff --git a/php_http_client.c b/php_http_client.c index c307221..1f4e09a 100644 --- a/php_http_client.c +++ b/php_http_client.c @@ -1,3 +1,15 @@ +/* + +--------------------------------------------------------------------+ + | PECL :: http | + +--------------------------------------------------------------------+ + | Redistribution and use in source and binary forms, with or without | + | modification, are permitted provided that the conditions mentioned | + | in the accompanying LICENSE file are met. | + +--------------------------------------------------------------------+ + | Copyright (c) 2004-2013, Michael Wallner | + +--------------------------------------------------------------------+ +*/ + #include "php_http_api.h" #include "php_http_client.h" @@ -8,27 +20,40 @@ */ static HashTable php_http_client_drivers; -PHP_HTTP_API STATUS php_http_client_driver_add(const char *name_str, uint name_len, php_http_client_driver_t *driver) +PHP_HTTP_API STATUS php_http_client_driver_add(php_http_client_driver_t *driver) { - return zend_hash_add(&php_http_client_drivers, name_str, name_len + 1, (void *) driver, sizeof(php_http_client_driver_t), NULL); + return zend_hash_add(&php_http_client_drivers, driver->name_str, driver->name_len + 1, (void *) driver, sizeof(php_http_client_driver_t), NULL); } -PHP_HTTP_API STATUS php_http_client_driver_get(char **name_str, uint *name_len, php_http_client_driver_t *driver) +PHP_HTTP_API STATUS php_http_client_driver_get(const char *name_str, size_t name_len, php_http_client_driver_t *driver) { php_http_client_driver_t *tmp; - if (*name_str && SUCCESS == zend_hash_find(&php_http_client_drivers, *name_str, (*name_len) + 1, (void *) &tmp)) { - *driver = *tmp; - return SUCCESS; - } else if (SUCCESS == zend_hash_get_current_data(&php_http_client_drivers, (void *) &tmp)) { - zend_hash_get_current_key_ex(&php_http_client_drivers, name_str, name_len, NULL, 0, NULL); - --(*name_len); + if ((name_str && SUCCESS == zend_hash_find(&php_http_client_drivers, name_str, name_len + 1, (void *) &tmp)) + || (SUCCESS == zend_hash_get_current_data(&php_http_client_drivers, (void *) &tmp))) { *driver = *tmp; return SUCCESS; } return FAILURE; } +static int apply_driver_list(void *p, void *arg TSRMLS_DC) +{ + php_http_client_driver_t *d = p; + zval *zname; + + MAKE_STD_ZVAL(zname); + ZVAL_STRINGL(zname, d->name_str, d->name_len, 1); + + zend_hash_next_index_insert(arg, &zname, sizeof(zval *), NULL); + return ZEND_HASH_APPLY_KEEP; +} + +PHP_HTTP_API void php_http_client_driver_list(HashTable *ht TSRMLS_DC) +{ + zend_hash_apply_with_argument(&php_http_client_drivers, apply_driver_list, ht TSRMLS_CC); +} + void php_http_client_options_set_subr(zval *this_ptr, char *key, size_t len, zval *opts, int overwrite TSRMLS_DC) { if (overwrite || (opts && zend_hash_num_elements(Z_ARRVAL_P(opts)))) { @@ -338,7 +363,7 @@ static void handle_history(zval *zclient, php_http_message_t *request, php_http_ { zval *new_hist, *old_hist = zend_read_property(php_http_client_class_entry, zclient, ZEND_STRL("history"), 0 TSRMLS_CC); php_http_message_t *zipped = php_http_message_zip(response, request); - zend_object_value ov = php_http_message_object_new_ex(php_http_message_get_class_entry(), zipped, NULL TSRMLS_CC); + zend_object_value ov = php_http_message_object_new_ex(php_http_message_class_entry, zipped, NULL TSRMLS_CC); MAKE_STD_ZVAL(new_hist); ZVAL_OBJVAL(new_hist, ov, 0); @@ -374,7 +399,7 @@ static STATUS handle_response(void *arg, php_http_client_t *client, php_http_cli *response = NULL; MAKE_STD_ZVAL(zresponse); - ZVAL_OBJVAL(zresponse, php_http_message_object_new_ex(php_http_client_response_get_class_entry(), msg, &msg_obj TSRMLS_CC), 0); + ZVAL_OBJVAL(zresponse, php_http_message_object_new_ex(php_http_client_response_class_entry, msg, &msg_obj TSRMLS_CC), 0); MAKE_STD_ZVAL(zrequest); ZVAL_OBJVAL(zrequest, ((php_http_message_object_t *) e->opaque)->zv, 1); @@ -384,7 +409,7 @@ static STATUS handle_response(void *arg, php_http_client_t *client, php_http_cli MAKE_STD_ZVAL(info); array_init(info); php_http_client_getopt(client, PHP_HTTP_CLIENT_OPT_TRANSFER_INFO, e->request, &Z_ARRVAL_P(info)); - zend_update_property(php_http_client_response_get_class_entry(), zresponse, ZEND_STRL("transferInfo"), info TSRMLS_CC); + zend_update_property(php_http_client_response_class_entry, zresponse, ZEND_STRL("transferInfo"), info TSRMLS_CC); zval_ptr_dtor(&info); zend_objects_store_add_ref_by_handle(msg_obj->zv.handle TSRMLS_CC); @@ -420,20 +445,30 @@ static STATUS handle_response(void *arg, php_http_client_t *client, php_http_cli return SUCCESS; } -static void handle_progress(void *arg, php_http_client_t *client, php_http_client_enqueue_t *e, php_http_client_progress_state_t *state) +static void handle_progress(void *arg, php_http_client_t *client, php_http_client_enqueue_t *e, php_http_client_progress_state_t *progress) { - zval *zrequest, *retval = NULL, *zclient; + zval *zrequest, *zprogress, *retval = NULL, *zclient; TSRMLS_FETCH_FROM_CTX(client->ts); MAKE_STD_ZVAL(zclient); ZVAL_OBJVAL(zclient, ((php_http_client_object_t *) arg)->zv, 1); MAKE_STD_ZVAL(zrequest); ZVAL_OBJVAL(zrequest, ((php_http_message_object_t *) e->opaque)->zv, 1); + MAKE_STD_ZVAL(zprogress); + object_init(zprogress); + add_property_bool(zprogress, "started", progress->started); + add_property_bool(zprogress, "finished", progress->finished); + add_property_string(zprogress, "info", STR_PTR(progress->info), 1); + add_property_double(zprogress, "dltotal", progress->dl.total); + add_property_double(zprogress, "dlnow", progress->dl.now); + add_property_double(zprogress, "ultotal", progress->ul.total); + add_property_double(zprogress, "ulnow", progress->ul.now); with_error_handling(EH_NORMAL, NULL) { - zend_call_method_with_1_params(&zclient, NULL, NULL, "notify", &retval, zrequest); + zend_call_method_with_2_params(&zclient, NULL, NULL, "notify", &retval, zrequest, zprogress); } end_error_handling(); zval_ptr_dtor(&zclient); zval_ptr_dtor(&zrequest); + zval_ptr_dtor(&zprogress); if (retval) { zval_ptr_dtor(&retval); } @@ -453,14 +488,14 @@ ZEND_BEGIN_ARG_INFO_EX(ai_HttpClient_construct, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(HttpClient, __construct) { - with_error_handling(EH_THROW, php_http_exception_get_class_entry()) { + with_error_handling(EH_THROW, php_http_exception_class_entry) { char *driver_str = NULL, *persistent_handle_str = NULL; int driver_len = 0, persistent_handle_len = 0; if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ss", &driver_str, &driver_len, &persistent_handle_str, &persistent_handle_len)) { php_http_client_driver_t driver; - if (SUCCESS == php_http_client_driver_get(&driver_str, (uint *) &driver_len, &driver)) { + if (SUCCESS == php_http_client_driver_get(driver_str, driver_len, &driver)) { php_resource_factory_t *rf = NULL; php_http_client_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC); zval *os; @@ -475,7 +510,8 @@ static PHP_METHOD(HttpClient, __construct) size_t name_len; php_persistent_handle_factory_t *pf; - name_len = spprintf(&name_str, 0, "http\\Client\\%s", php_http_pretty_key(driver_str, driver_len, 1, 1)); + name_len = spprintf(&name_str, 0, "http\\Client\\%s", driver.name_str); + php_http_pretty_key(name_str + sizeof("http\\Client"), driver.name_len, 1, 1); if ((pf = php_persistent_handle_concede(NULL , name_str, name_len, persistent_handle_str, persistent_handle_len, NULL, NULL TSRMLS_CC))) { rf = php_resource_factory_init(NULL, php_persistent_handle_get_resource_factory_ops(), pf, (void (*)(void *)) php_persistent_handle_abandon); @@ -535,7 +571,7 @@ static HashTable *combined_options(zval *client, zval *request TSRMLS_DC) } if (z_roptions) { if (Z_TYPE_P(z_roptions) == IS_ARRAY) { - array_join(Z_ARRVAL_P(z_roptions), options, 1, 0); + array_join(Z_ARRVAL_P(z_roptions), options, 0, 0); } zval_ptr_dtor(&z_roptions); } @@ -565,12 +601,12 @@ ZEND_BEGIN_ARG_INFO_EX(ai_HttpClient_enqueue, 0, 0, 1) ZEND_END_ARG_INFO(); static PHP_METHOD(HttpClient, enqueue) { - with_error_handling(EH_THROW, php_http_exception_get_class_entry()) { + with_error_handling(EH_THROW, php_http_exception_class_entry) { zval *request; zend_fcall_info fci = empty_fcall_info; zend_fcall_info_cache fcc = empty_fcall_info_cache; - if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|f", &request, php_http_client_request_get_class_entry(), &fci, &fcc)) { + if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|f", &request, php_http_client_request_class_entry, &fci, &fcc)) { php_http_client_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC); php_http_message_object_t *msg_obj = zend_object_store_get_object(request TSRMLS_CC); @@ -606,10 +642,10 @@ ZEND_BEGIN_ARG_INFO_EX(ai_HttpClient_dequeue, 0, 0, 1) ZEND_END_ARG_INFO(); static PHP_METHOD(HttpClient, dequeue) { - with_error_handling(EH_THROW, php_http_exception_get_class_entry()) { + with_error_handling(EH_THROW, php_http_exception_class_entry) { zval *request; - if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &request, php_http_client_request_get_class_entry())) { + if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &request, php_http_client_request_class_entry)) { php_http_client_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC); php_http_message_object_t *msg_obj = zend_object_store_get_object(request TSRMLS_CC); @@ -626,12 +662,12 @@ ZEND_BEGIN_ARG_INFO_EX(ai_HttpClient_requeue, 0, 0, 1) ZEND_END_ARG_INFO(); static PHP_METHOD(HttpClient, requeue) { - with_error_handling(EH_THROW, php_http_exception_get_class_entry()) { + with_error_handling(EH_THROW, php_http_exception_class_entry) { zval *request; zend_fcall_info fci = empty_fcall_info; zend_fcall_info_cache fcc = empty_fcall_info_cache; - if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|f", &request, php_http_client_request_get_class_entry(), &fci, &fcc)) { + if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|f", &request, php_http_client_request_class_entry, &fci, &fcc)) { php_http_client_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC); php_http_message_object_t *msg_obj = zend_object_store_get_object(request TSRMLS_CC); php_http_client_enqueue_t q = { @@ -661,19 +697,38 @@ static PHP_METHOD(HttpClient, requeue) } ZEND_BEGIN_ARG_INFO_EX(ai_HttpClient_getResponse, 0, 0, 0) + ZEND_ARG_OBJ_INFO(0, request, http\\Client\\Request, 1) ZEND_END_ARG_INFO(); static PHP_METHOD(HttpClient, getResponse) { - if (SUCCESS == zend_parse_parameters_none()) { + zval *zrequest = NULL; + + if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|O", &zrequest, php_http_client_request_class_entry)) { php_http_client_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC); - if (obj->client->responses.tail) { - php_http_message_object_t *response_obj = *(php_http_message_object_t **) obj->client->responses.tail->data; + if (!zrequest) { + /* pop off the last respone */ + if (obj->client->responses.tail) { + php_http_message_object_t *response_obj = *(php_http_message_object_t **) obj->client->responses.tail->data; + + /* pop off and go */ + if (response_obj) { + RETVAL_OBJVAL(response_obj->zv, 1); + zend_llist_remove_tail(&obj->client->responses); + } + } + } else { + /* lookup the response with the request */ + zend_llist_element *el = NULL; + php_http_message_object_t *req_obj = zend_object_store_get_object(zrequest TSRMLS_CC); + + for (el = obj->client->responses.head; el; el = el->next) { + php_http_message_object_t *response_obj = *(php_http_message_object_t **) el->data; - /* pop off and go */ - if (response_obj) { - RETVAL_OBJVAL(response_obj->zv, 1); - zend_llist_remove_tail(&obj->client->responses); + if (response_obj->message->parent == req_obj->message) { + RETVAL_OBJVAL(response_obj->zv, 1); + break; + } } } } @@ -695,9 +750,9 @@ static PHP_METHOD(HttpClient, send) { RETVAL_FALSE; - with_error_handling(EH_THROW, php_http_exception_get_class_entry()) { + with_error_handling(EH_THROW, php_http_exception_class_entry) { if (SUCCESS == zend_parse_parameters_none()) { - with_error_handling(EH_THROW, php_http_exception_get_class_entry()) { + with_error_handling(EH_THROW, php_http_exception_class_entry) { php_http_client_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC); php_http_client_exec(obj->client); @@ -736,7 +791,7 @@ static PHP_METHOD(HttpClient, wait) timeout_val.tv_sec = (time_t) timeout; timeout_val.tv_usec = PHP_HTTP_USEC(timeout) % PHP_HTTP_MCROSEC; - RETURN_SUCCESS(php_http_client_wait(obj->client, timeout > 0 ? &timeout_val : NULL)); + RETURN_BOOL(SUCCESS == php_http_client_wait(obj->client, timeout > 0 ? &timeout_val : NULL)); } RETURN_FALSE; } @@ -773,18 +828,11 @@ static PHP_METHOD(HttpClient, enableEvents) static int notify(zend_object_iterator *iter, void *puser TSRMLS_DC) { - zval **observer = NULL, **args = puser; + zval **observer = NULL, ***args = puser; iter->funcs->get_current_data(iter, &observer TSRMLS_CC); if (observer) { - zval *retval = NULL; - - zend_call_method(observer, NULL, NULL, ZEND_STRL("update"), &retval, args[1]?2:1, args[0], args[1] TSRMLS_CC); - if (retval) { - zval_ptr_dtor(&retval); - } - - return SUCCESS; + return php_http_method_call(*observer, ZEND_STRL("update"), args[2]?3:args[1]?2:args[0]?1:0, args, NULL TSRMLS_CC); } return FAILURE; } @@ -794,23 +842,30 @@ ZEND_BEGIN_ARG_INFO_EX(ai_HttpClient_notify, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(HttpClient, notify) { - zval *request = NULL; + zval *request = NULL, *zprogress = NULL; - if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|O!", &request, php_http_client_request_get_class_entry())) { - zval *args[2], *observers = zend_read_property(php_http_client_class_entry, getThis(), ZEND_STRL("observers"), 0 TSRMLS_CC); + if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|O!o!", &request, php_http_client_request_class_entry, &zprogress)) { + zval **args[3], *observers = zend_read_property(php_http_client_class_entry, getThis(), ZEND_STRL("observers"), 0 TSRMLS_CC); if (Z_TYPE_P(observers) == IS_OBJECT) { Z_ADDREF_P(getThis()); + args[0] = &getThis(); if (request) { Z_ADDREF_P(request); } - args[0] = getThis(); - args[1] = request; - spl_iterator_apply(observers, notify, &args TSRMLS_CC); + args[1] = &request; + if (zprogress) { + Z_ADDREF_P(zprogress); + } + args[2] = &zprogress; + spl_iterator_apply(observers, notify, args TSRMLS_CC); zval_ptr_dtor(&getThis()); if (request) { zval_ptr_dtor(&request); } + if (zprogress) { + zval_ptr_dtor(&zprogress); + } } } @@ -855,7 +910,7 @@ ZEND_BEGIN_ARG_INFO_EX(ai_HttpClient_getObservers, 0, 0, 0) ZEND_END_ARG_INFO(); static PHP_METHOD(HttpClient, getObservers) { - with_error_handling(EH_THROW, php_http_exception_get_class_entry()) { + with_error_handling(EH_THROW, php_http_exception_class_entry) { if (SUCCESS == zend_parse_parameters_none()) { zval *observers = zend_read_property(php_http_client_class_entry, getThis(), ZEND_STRL("observers"), 0 TSRMLS_CC); RETVAL_ZVAL(observers, 1, 0); @@ -870,8 +925,8 @@ static PHP_METHOD(HttpClient, getProgressInfo) { zval *request; - with_error_handling(EH_THROW, php_http_exception_get_class_entry()) { - if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &request, php_http_client_request_get_class_entry())) { + with_error_handling(EH_THROW, php_http_exception_class_entry) { + if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &request, php_http_client_request_class_entry)) { php_http_client_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC); php_http_message_object_t *req_obj = zend_object_store_get_object(request TSRMLS_CC); php_http_client_progress_state_t *progress; @@ -897,8 +952,8 @@ static PHP_METHOD(HttpClient, getTransferInfo) { zval *request; - with_error_handling(EH_THROW, php_http_exception_get_class_entry()) { - if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &request, php_http_client_request_get_class_entry())) { + with_error_handling(EH_THROW, php_http_exception_class_entry) { + if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &request, php_http_client_request_class_entry)) { php_http_client_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC); php_http_message_object_t *req_obj = zend_object_store_get_object(request TSRMLS_CC); @@ -1006,33 +1061,43 @@ static PHP_METHOD(HttpClient, getCookies) } } +ZEND_BEGIN_ARG_INFO_EX(ai_HttpClient_getAvailableDrivers, 0, 0, 0) +ZEND_END_ARG_INFO(); +static PHP_METHOD(HttpClient, getAvailableDrivers) { + if (SUCCESS == zend_parse_parameters_none()) { + array_init(return_value); + php_http_client_driver_list(Z_ARRVAL_P(return_value) TSRMLS_CC); + } +} + static zend_function_entry php_http_client_methods[] = { - PHP_ME(HttpClient, __construct, ai_HttpClient_construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) - PHP_ME(HttpClient, reset, ai_HttpClient_reset, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, enqueue, ai_HttpClient_enqueue, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, dequeue, ai_HttpClient_dequeue, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, requeue, ai_HttpClient_requeue, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, send, ai_HttpClient_send, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, once, ai_HttpClient_once, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, wait, ai_HttpClient_wait, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, getResponse, ai_HttpClient_getResponse, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, getHistory, ai_HttpClient_getHistory, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, enablePipelining, ai_HttpClient_enablePipelining, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, enableEvents, ai_HttpClient_enableEvents, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, notify, ai_HttpClient_notify, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, attach, ai_HttpClient_attach, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, detach, ai_HttpClient_detach, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, getObservers, ai_HttpClient_getObservers, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, getProgressInfo, ai_HttpClient_getProgressInfo, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, getTransferInfo, ai_HttpClient_getTransferInfo, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, setOptions, ai_HttpClient_setOptions, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, getOptions, ai_HttpClient_getOptions, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, setSslOptions, ai_HttpClient_setSslOptions, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, addSslOptions, ai_HttpClient_addSslOptions, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, getSslOptions, ai_HttpClient_getSslOptions, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, setCookies, ai_HttpClient_setCookies, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, addCookies, ai_HttpClient_addCookies, ZEND_ACC_PUBLIC) - PHP_ME(HttpClient, getCookies, ai_HttpClient_getCookies, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, __construct, ai_HttpClient_construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) + PHP_ME(HttpClient, reset, ai_HttpClient_reset, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, enqueue, ai_HttpClient_enqueue, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, dequeue, ai_HttpClient_dequeue, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, requeue, ai_HttpClient_requeue, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, send, ai_HttpClient_send, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, once, ai_HttpClient_once, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, wait, ai_HttpClient_wait, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, getResponse, ai_HttpClient_getResponse, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, getHistory, ai_HttpClient_getHistory, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, enablePipelining, ai_HttpClient_enablePipelining, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, enableEvents, ai_HttpClient_enableEvents, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, notify, ai_HttpClient_notify, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, attach, ai_HttpClient_attach, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, detach, ai_HttpClient_detach, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, getObservers, ai_HttpClient_getObservers, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, getProgressInfo, ai_HttpClient_getProgressInfo, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, getTransferInfo, ai_HttpClient_getTransferInfo, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, setOptions, ai_HttpClient_setOptions, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, getOptions, ai_HttpClient_getOptions, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, setSslOptions, ai_HttpClient_setSslOptions, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, addSslOptions, ai_HttpClient_addSslOptions, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, getSslOptions, ai_HttpClient_getSslOptions, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, setCookies, ai_HttpClient_setCookies, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, addCookies, ai_HttpClient_addCookies, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, getCookies, ai_HttpClient_getCookies, ZEND_ACC_PUBLIC) + PHP_ME(HttpClient, getAvailableDrivers, ai_HttpClient_getAvailableDrivers, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) EMPTY_FUNCTION_ENTRY }; @@ -1061,3 +1126,12 @@ PHP_MSHUTDOWN_FUNCTION(http_client) zend_hash_destroy(&php_http_client_drivers); return SUCCESS; } + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: noet sw=4 ts=4 fdm=marker + * vim<600: noet sw=4 ts=4 + */