- fix refelction info
authorMichael Wallner <mike@php.net>
Thu, 21 Jul 2005 09:33:10 +0000 (09:33 +0000)
committerMichael Wallner <mike@php.net>
Thu, 21 Jul 2005 09:33:10 +0000 (09:33 +0000)
http_message_object.c
http_request_object.c
http_requestpool_object.c
http_response_object.c

index 99bc2768df149988b7197ceecf2218ead8c5e70f..08f37f4e09df3d98645d8ff13efd18216908610b 100644 (file)
 
 #include "phpstr/phpstr.h"
 
-#define HTTP_BEGIN_ARGS(method, req_args)              HTTP_BEGIN_ARGS_EX(HttpMessage, method, ZEND_RETURN_REFERENCE_AGNOSTIC, req_args)
-#define HTTP_EMPTY_ARGS(method, ret_ref)               HTTP_EMPTY_ARGS_EX(HttpMessage, method, ret_ref)
-#define HTTP_MESSAGE_ME(method, visibility)            PHP_ME(HttpMessage, method, HTTP_ARGS(HttpMessage, method), visibility)
+#define HTTP_BEGIN_ARGS(method, ret_ref, req_args)     HTTP_BEGIN_ARGS_EX(HttpMessage, method, ret_ref, req_args)
+#define HTTP_EMPTY_ARGS(method, ret_ref)                       HTTP_EMPTY_ARGS_EX(HttpMessage, method, ret_ref)
+#define HTTP_MESSAGE_ME(method, visibility)                    PHP_ME(HttpMessage, method, HTTP_ARGS(HttpMessage, method), visibility)
 
-HTTP_BEGIN_ARGS(__construct, 0)
+HTTP_BEGIN_ARGS(__construct, 0, 0)
        HTTP_ARG_VAL(message, 0)
 HTTP_END_ARGS;
 
-HTTP_BEGIN_ARGS(fromString, 1)
+HTTP_BEGIN_ARGS(fromString, 1, 1)
        HTTP_ARG_VAL(message, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getBody, 0);
 HTTP_EMPTY_ARGS(getHeaders, 0);
-HTTP_BEGIN_ARGS(setHeaders, 1)
+HTTP_BEGIN_ARGS(setHeaders, 0, 1)
        HTTP_ARG_VAL(headers, 0)
 HTTP_END_ARGS;
 
-HTTP_BEGIN_ARGS(addHeaders, 1)
+HTTP_BEGIN_ARGS(addHeaders, 0, 1)
        HTTP_ARG_VAL(headers, 0)
        HTTP_ARG_VAL(append, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getType, 0);
-HTTP_BEGIN_ARGS(setType, 1)
+HTTP_BEGIN_ARGS(setType, 0, 1)
        HTTP_ARG_VAL(type, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getResponseCode, 0);
-HTTP_BEGIN_ARGS(setResponseCode, 1)
+HTTP_BEGIN_ARGS(setResponseCode, 0, 1)
        HTTP_ARG_VAL(response_code, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getRequestMethod, 0);
-HTTP_BEGIN_ARGS(setRequestMethod, 1)
+HTTP_BEGIN_ARGS(setRequestMethod, 0, 1)
        HTTP_ARG_VAL(request_method, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getRequestUri, 0);
-HTTP_BEGIN_ARGS(setRequestUri, 1)
+HTTP_BEGIN_ARGS(setRequestUri, 0, 1)
        HTTP_ARG_VAL(uri, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getHttpVersion, 0);
-HTTP_BEGIN_ARGS(setHttpVersion, 1)
+HTTP_BEGIN_ARGS(setHttpVersion, 0, 1)
        HTTP_ARG_VAL(http_version, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getParentMessage, 1);
 HTTP_EMPTY_ARGS(send, 0);
-HTTP_BEGIN_ARGS(toString, 0)
+HTTP_BEGIN_ARGS(toString, 0, 0)
        HTTP_ARG_VAL(include_parent, 0)
 HTTP_END_ARGS;
 
index 94de28a9a77380caa3fdcce2974948b2f141c850..c324240d7ec9faab93dd521fd05850eb088f1ef9 100644 (file)
 #endif
 #include <curl/curl.h>
 
-#define HTTP_BEGIN_ARGS(method, req_args)              HTTP_BEGIN_ARGS_EX(HttpRequest, method, ZEND_RETURN_REFERENCE_AGNOSTIC, req_args)
-#define HTTP_EMPTY_ARGS(method, ret_ref)               HTTP_EMPTY_ARGS_EX(HttpRequest, method, ret_ref)
-#define HTTP_REQUEST_ME(method, visibility)            PHP_ME(HttpRequest, method, HTTP_ARGS(HttpRequest, method), visibility)
+#define HTTP_BEGIN_ARGS(method, ret_ref, req_args)     HTTP_BEGIN_ARGS_EX(HttpRequest, method, ret_ref, req_args)
+#define HTTP_EMPTY_ARGS(method, ret_ref)                       HTTP_EMPTY_ARGS_EX(HttpRequest, method, ret_ref)
+#define HTTP_REQUEST_ME(method, visibility)                    PHP_ME(HttpRequest, method, HTTP_ARGS(HttpRequest, method), visibility)
 
 HTTP_EMPTY_ARGS(__destruct, 0);
-HTTP_BEGIN_ARGS(__construct, 0)
+HTTP_BEGIN_ARGS(__construct, 0, 0)
        HTTP_ARG_VAL(url, 0)
        HTTP_ARG_VAL(method, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getOptions, 0);
 HTTP_EMPTY_ARGS(unsetOptions, 0);
-HTTP_BEGIN_ARGS(setOptions, 1)
+HTTP_BEGIN_ARGS(setOptions, 0, 1)
        HTTP_ARG_VAL(options, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getSslOptions, 0);
 HTTP_EMPTY_ARGS(unsetSslOptions, 0);
-HTTP_BEGIN_ARGS(setSslOptions, 1)
+HTTP_BEGIN_ARGS(setSslOptions, 0, 1)
        HTTP_ARG_VAL(ssl_options, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getHeaders, 0);
 HTTP_EMPTY_ARGS(unsetHeaders, 0);
-HTTP_BEGIN_ARGS(addHeaders, 1)
+HTTP_BEGIN_ARGS(addHeaders, 0, 1)
        HTTP_ARG_VAL(headers, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getCookies, 0);
 HTTP_EMPTY_ARGS(unsetCookies, 0);
-HTTP_BEGIN_ARGS(addCookies, 1)
+HTTP_BEGIN_ARGS(addCookies, 0, 1)
        HTTP_ARG_VAL(cookies, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getUrl, 0);
-HTTP_BEGIN_ARGS(setUrl, 1)
+HTTP_BEGIN_ARGS(setUrl, 0, 1)
        HTTP_ARG_VAL(url, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getMethod, 0);
-HTTP_BEGIN_ARGS(setMethod, 1)
+HTTP_BEGIN_ARGS(setMethod, 0, 1)
        HTTP_ARG_VAL(request_method, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getContentType, 0);
-HTTP_BEGIN_ARGS(setContentType, 1)
+HTTP_BEGIN_ARGS(setContentType, 0, 1)
        HTTP_ARG_VAL(content_type, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getQueryData, 0);
 HTTP_EMPTY_ARGS(unsetQueryData, 0);
-HTTP_BEGIN_ARGS(setQueryData, 1)
+HTTP_BEGIN_ARGS(setQueryData, 0, 1)
        HTTP_ARG_VAL(query_data, 0)
 HTTP_END_ARGS;
 
-HTTP_BEGIN_ARGS(addQueryData, 1)
+HTTP_BEGIN_ARGS(addQueryData, 0, 1)
        HTTP_ARG_VAL(query_data, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getPostFields, 0);
 HTTP_EMPTY_ARGS(unsetPostFields, 0);
-HTTP_BEGIN_ARGS(setPostFields, 1)
+HTTP_BEGIN_ARGS(setPostFields, 0, 1)
        HTTP_ARG_VAL(post_fields, 0)
 HTTP_END_ARGS;
 
-HTTP_BEGIN_ARGS(addPostFields, 1)
+HTTP_BEGIN_ARGS(addPostFields, 0, 1)
        HTTP_ARG_VAL(post_fields, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getPostFiles, 0);
 HTTP_EMPTY_ARGS(unsetPostFiles, 0);
-HTTP_BEGIN_ARGS(setPostFiles, 1)
+HTTP_BEGIN_ARGS(setPostFiles, 0, 1)
        HTTP_ARG_VAL(post_files, 0)
 HTTP_END_ARGS;
 
-HTTP_BEGIN_ARGS(addPostFile, 2)
+HTTP_BEGIN_ARGS(addPostFile, 0, 2)
        HTTP_ARG_VAL(formname, 0)
        HTTP_ARG_VAL(filename, 0)
        HTTP_ARG_VAL(content_type, 0)
@@ -121,22 +121,22 @@ HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getPutFile, 0);
 HTTP_EMPTY_ARGS(unsetPutFile, 0);
-HTTP_BEGIN_ARGS(setPutFile, 1)
+HTTP_BEGIN_ARGS(setPutFile, 0, 1)
        HTTP_ARG_VAL(filename, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getResponseData, 0);
-HTTP_BEGIN_ARGS(getResponseHeader, 0)
+HTTP_BEGIN_ARGS(getResponseHeader, 0, 0)
        HTTP_ARG_VAL(name, 0)
 HTTP_END_ARGS;
 
-HTTP_BEGIN_ARGS(getResponseCookie, 0)
+HTTP_BEGIN_ARGS(getResponseCookie, 0, 0)
        HTTP_ARG_VAL(name, 0)
 HTTP_END_ARGS;
 
 HTTP_EMPTY_ARGS(getResponseBody, 0);
 HTTP_EMPTY_ARGS(getResponseCode, 0);
-HTTP_BEGIN_ARGS(getResponseInfo, 0)
+HTTP_BEGIN_ARGS(getResponseInfo, 0, 0)
        HTTP_ARG_VAL(name, 0)
 HTTP_END_ARGS;
 
index af2dcf76f215f2969001dee20ff0345e476d7f94..28aa366e399465c6565867837d54fc37e6aa4aab 100644 (file)
@@ -34,9 +34,9 @@
 #endif
 #include <curl/curl.h>
 
-#define HTTP_BEGIN_ARGS(method, req_args)              HTTP_BEGIN_ARGS_EX(HttpRequestPool, method, ZEND_RETURN_REFERENCE_AGNOSTIC, req_args)
-#define HTTP_EMPTY_ARGS(method, ret_ref)               HTTP_EMPTY_ARGS_EX(HttpRequestPool, method, ret_ref)
-#define HTTP_REQPOOL_ME(method, visibility)            PHP_ME(HttpRequestPool, method, HTTP_ARGS(HttpRequestPool, method), visibility)
+#define HTTP_BEGIN_ARGS(method, req_args)      HTTP_BEGIN_ARGS_EX(HttpRequestPool, method, 0, req_args)
+#define HTTP_EMPTY_ARGS(method, ret_ref)       HTTP_EMPTY_ARGS_EX(HttpRequestPool, method, ret_ref)
+#define HTTP_REQPOOL_ME(method, visibility)    PHP_ME(HttpRequestPool, method, HTTP_ARGS(HttpRequestPool, method), visibility)
 
 HTTP_BEGIN_ARGS_AR(HttpRequestPool, __construct, 0, 0)
        HTTP_ARG_OBJ(HttpRequest, request0, 0)
index bb2f0cebbe011ab4ebaaecb055d78393903d668e..add22bf4fd83f8857a830cc2443ffffdd54e1280 100644 (file)
@@ -160,11 +160,11 @@ static inline void _http_response_object_declare_default_properties(TSRMLS_D)
 {
        zend_class_entry *ce = http_response_object_ce;
 
-       DCL_STATIC_PROP(PRIVATE, long, sent, 0);
+       DCL_STATIC_PROP(PRIVATE, bool, sent, 0);
+       DCL_STATIC_PROP(PRIVATE, bool, catch, 0);
        DCL_STATIC_PROP(PRIVATE, long, mode, -1);
-       DCL_STATIC_PROP(PRIVATE, long, catch, 0);
-       DCL_STATIC_PROP(PROTECTED, long, cache, 0);
-       DCL_STATIC_PROP(PROTECTED, long, gzip, 0);
+       DCL_STATIC_PROP(PROTECTED, bool, cache, 0);
+       DCL_STATIC_PROP(PROTECTED, bool, gzip, 0);
        DCL_STATIC_PROP(PROTECTED, long, stream, 0);
        DCL_STATIC_PROP(PROTECTED, string, file, "");
        DCL_STATIC_PROP(PROTECTED, string, data, "");
@@ -249,7 +249,7 @@ PHP_METHOD(HttpResponse, getGzip)
 
 /* {{{ proto bool HttpResponse::setCacheControl(string control[, long max_age = 0])
  *
- * Set a custom cache-control header, usually being "private" or "public"; 
+ * Set a custom cache-control header, usually being "private" or "public";
  * The max_age parameter controls how long the cache entry is valid on the client side.
  */
 PHP_METHOD(HttpResponse, setCacheControl)
@@ -613,7 +613,7 @@ PHP_METHOD(HttpResponse, send)
                zval *cd = GET_STATIC_PROP(contentDisposition);
                if (Z_STRLEN_P(cd)) {
                        char *cds;
-                       
+
                        spprintf(&cds, 0, "Content-Disposition: %s", Z_STRVAL_P(cd));
                        http_send_header(cds);
                        efree(cds);