X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_request_factory.c;h=b1655f6b8fd7c44113b3a099f28695a3af529ed1;hp=1e61e5915138fba2bb2003d32f0b9b2f76e4c965;hb=4407379af8d886b627c88572e9da69c38cdbda58;hpb=a07b79b1871054ca17e48b69445b4dc201f24662 diff --git a/php_http_request_factory.c b/php_http_request_factory.c index 1e61e59..b1655f6 100644 --- a/php_http_request_factory.c +++ b/php_http_request_factory.c @@ -1,9 +1,18 @@ +/* + +--------------------------------------------------------------------+ + | 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-2011, Michael Wallner | + +--------------------------------------------------------------------+ +*/ + +#include "php_http_api.h" -#include "php_http.h" - -#include #include -#include /* * array of name => php_http_request_factory_driver_t* @@ -50,13 +59,19 @@ PHP_HTTP_BEGIN_ARGS(__construct, 1) PHP_HTTP_ARG_VAL(options, 0) PHP_HTTP_END_ARGS; PHP_HTTP_BEGIN_ARGS(createRequest, 0) - PHP_HTTP_ARG_VAL(persistentHandle, 0) + PHP_HTTP_ARG_VAL(url, 0) + PHP_HTTP_ARG_VAL(method, 0) + PHP_HTTP_ARG_VAL(options, 0) PHP_HTTP_END_ARGS; PHP_HTTP_BEGIN_ARGS(createPool, 0) - PHP_HTTP_ARG_VAL(persistentHandle, 0) + PHP_HTTP_ARG_OBJ(http\\Request, request1, 1) + PHP_HTTP_ARG_OBJ(http\\Request, request2, 1) + PHP_HTTP_ARG_OBJ(http\\Request, requestN, 1) PHP_HTTP_END_ARGS; PHP_HTTP_BEGIN_ARGS(createDataShare, 0) - PHP_HTTP_ARG_VAL(persistentHandle, 0) + PHP_HTTP_ARG_OBJ(http\\Request, request1, 1) + PHP_HTTP_ARG_OBJ(http\\Request, request2, 1) + PHP_HTTP_ARG_OBJ(http\\Request, requestN, 1) PHP_HTTP_END_ARGS; PHP_HTTP_EMPTY_ARGS(getGlobalDataShareInstance); PHP_HTTP_EMPTY_ARGS(getDriver); @@ -382,7 +397,7 @@ PHP_MINIT_FUNCTION(http_request_factory) { zend_hash_init(&php_http_request_factory_drivers, 0, NULL, NULL, 1); - PHP_HTTP_REGISTER_CLASS(http\\request, Factory, http_request_factory, php_http_object_class_entry, 0); + PHP_HTTP_REGISTER_CLASS(http\\Request, Factory, http_request_factory, php_http_object_class_entry, 0); php_http_request_factory_class_entry->create_object = php_http_request_factory_new; zend_declare_property_stringl(php_http_request_factory_class_entry, ZEND_STRL("driver"), ZEND_STRL("curl"), ZEND_ACC_PROTECTED TSRMLS_CC); @@ -401,3 +416,13 @@ PHP_MSHUTDOWN_FUNCTION(http_request_factory) 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 + */ +