-PHP_HTTP_API php_http_request_t *php_http_request_init(php_http_request_t *h, php_http_request_ops_t *ops, void *init_arg TSRMLS_DC)
+PHP_HTTP_API php_http_request_t *php_http_request_init(php_http_request_t *h, php_http_request_ops_t *ops, php_http_resource_factory_t *rf, void *init_arg TSRMLS_DC)
h->buffer = php_http_buffer_init(NULL TSRMLS_CC);
h->parser = php_http_message_parser_init(NULL TSRMLS_CC);
h->message = php_http_message_init(NULL, 0 TSRMLS_CC);
h->buffer = php_http_buffer_init(NULL TSRMLS_CC);
h->parser = php_http_message_parser_init(NULL TSRMLS_CC);
h->message = php_http_message_init(NULL, 0 TSRMLS_CC);
php_http_message_parser_free(&h->parser);
php_http_message_free(&h->message);
php_http_buffer_free(&h->buffer);
php_http_message_parser_free(&h->parser);
php_http_message_free(&h->message);
php_http_buffer_free(&h->buffer);
- o->request = php_http_request_init(NULL, NULL, NULL TSRMLS_CC);
+ o->request = php_http_request_init(NULL, NULL, NULL, NULL TSRMLS_CC);
if (SUCCESS == php_http_request_getopt(obj->request, PHP_HTTP_REQUEST_OPT_PROGRESS_INFO, &progress)) {
if (!progress->callback) {
if (SUCCESS == php_http_request_getopt(obj->request, PHP_HTTP_REQUEST_OPT_PROGRESS_INFO, &progress)) {
if (!progress->callback) {
- add_next_index_zval(pcb, getThis());
- add_next_index_stringl(pcb, ZEND_STRL("notify"), 1);
+ add_next_index_zval(callback->func.user, getThis());
+ add_next_index_stringl(callback->func.user, ZEND_STRL("notify"), 1);
- php_http_request_setopt(obj->request, PHP_HTTP_REQUEST_OPT_PROGRESS_CALLBACK, pcb);
- php_http_request_setopt(obj->request, PHP_HTTP_REQUEST_OPT_PROGRESS_CALLBACK_WANTS_STATE, &no);
- zval_ptr_dtor(&pcb);
+ php_http_request_setopt(obj->request, PHP_HTTP_REQUEST_OPT_PROGRESS_CALLBACK, callback);
}
if (SUCCESS == php_http_request_getopt(obj->request, PHP_HTTP_REQUEST_OPT_PROGRESS_INFO, &progress)) {
}
if (SUCCESS == php_http_request_getopt(obj->request, PHP_HTTP_REQUEST_OPT_PROGRESS_INFO, &progress)) {
zend_parse_parameters_none();
} end_error_handling();
}
PHP_METHOD(HttpRequest, getObservers)
{
zend_parse_parameters_none();
} end_error_handling();
}
PHP_METHOD(HttpRequest, getObservers)
{
if (SUCCESS == zend_parse_parameters_none()) {
RETVAL_PROP(php_http_request_class_entry, "observers");
}
if (SUCCESS == zend_parse_parameters_none()) {
RETVAL_PROP(php_http_request_class_entry, "observers");
}
object_init(return_value);
add_property_bool(return_value, "started", progress->state.started);
add_property_bool(return_value, "finished", progress->state.finished);
object_init(return_value);
add_property_bool(return_value, "started", progress->state.started);
add_property_bool(return_value, "finished", progress->state.finished);
add_property_double(return_value, "dltotal", progress->state.dl.total);
add_property_double(return_value, "dlnow", progress->state.dl.now);
add_property_double(return_value, "ultotal", progress->state.ul.total);
add_property_double(return_value, "dltotal", progress->state.dl.total);
add_property_double(return_value, "dlnow", progress->state.dl.now);
add_property_double(return_value, "ultotal", progress->state.ul.total);
zend_update_property_stringl(php_http_request_class_entry, getThis(), ZEND_STRL("queryData"), Z_STRVAL_P(data), Z_STRLEN_P(data) TSRMLS_CC);
zval_ptr_dtor(&data);
zend_update_property_stringl(php_http_request_class_entry, getThis(), ZEND_STRL("queryData"), Z_STRVAL_P(data), Z_STRLEN_P(data) TSRMLS_CC);
zval_ptr_dtor(&data);
if (allowed_extras_array) {
allowed_extras = ecalloc(zend_hash_num_elements(Z_ARRVAL_P(allowed_extras_array)) + 1, sizeof(char *));
FOREACH_VAL(pos, allowed_extras_array, entry) {
if (allowed_extras_array) {
allowed_extras = ecalloc(zend_hash_num_elements(Z_ARRVAL_P(allowed_extras_array)) + 1, sizeof(char *));
FOREACH_VAL(pos, allowed_extras_array, entry) {
if ((list = php_http_cookie_list_parse(NULL, Z_STRVAL_P(data), flags, allowed_extras TSRMLS_CC))) {
zval *cookie;
if ((list = php_http_cookie_list_parse(NULL, Z_STRVAL_P(data), flags, allowed_extras TSRMLS_CC))) {
zval *cookie;
if ((list = php_http_cookie_list_parse(NULL, Z_STRVAL_P(data), flags, allowed_extras TSRMLS_CC))) {
zval *cookie;
if ((list = php_http_cookie_list_parse(NULL, Z_STRVAL_P(data), flags, allowed_extras TSRMLS_CC))) {
zval *cookie;
if (SUCCESS == zend_parse_parameters_none()) {
zval *message = zend_read_property(php_http_request_class_entry, getThis(), ZEND_STRL("responseMessage"), 0 TSRMLS_CC);
if (SUCCESS == zend_parse_parameters_none()) {
zval *message = zend_read_property(php_http_request_class_entry, getThis(), ZEND_STRL("responseMessage"), 0 TSRMLS_CC);
if (SUCCESS == zend_parse_parameters_none()) {
zval *message = zend_read_property(php_http_request_class_entry, getThis(), ZEND_STRL("requestMessage"), 0 TSRMLS_CC);
if (SUCCESS == zend_parse_parameters_none()) {
zval *message = zend_read_property(php_http_request_class_entry, getThis(), ZEND_STRL("requestMessage"), 0 TSRMLS_CC);
if (SUCCESS == zend_parse_parameters_none()) {
zval *hist = zend_read_property(php_http_request_class_entry, getThis(), ZEND_STRL("history"), 0 TSRMLS_CC);
if (SUCCESS == zend_parse_parameters_none()) {
zval *hist = zend_read_property(php_http_request_class_entry, getThis(), ZEND_STRL("history"), 0 TSRMLS_CC);
if (SUCCESS == zend_parse_parameters_none()) {
php_http_request_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC);
php_http_request_method_t meth = PHP_HTTP_NO_REQUEST_METHOD;
if (SUCCESS == zend_parse_parameters_none()) {
php_http_request_object_t *obj = zend_object_store_get_object(getThis() TSRMLS_CC);
php_http_request_method_t meth = PHP_HTTP_NO_REQUEST_METHOD;