-# define HTTP_REGISTER_CLASS_EX(classname, name, parent, flags) \
- { \
- zend_class_entry ce; \
- INIT_CLASS_ENTRY(ce, #classname, name## _class_methods); \
- ce.create_object = name## _new_object; \
- name## _ce = zend_register_internal_class_ex(&ce, parent, NULL TSRMLS_CC); \
- name## _ce->ce_flags |= flags; \
- memcpy(& name## _object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); \
- name## _object_handlers.clone_obj = NULL; \
- name## _declare_default_properties(name## _ce); \
- }
-
-# define HTTP_REGISTER_CLASS(classname, name, parent, flags) \
- { \
- zend_class_entry ce; \
- INIT_CLASS_ENTRY(ce, #classname, name## _class_methods); \
- ce.create_object = NULL; \
- name## _ce = zend_register_internal_class_ex(&ce, parent, NULL TSRMLS_CC); \
- name## _ce->ce_flags |= flags; \
- }
-
-# define getObject(t, o) t * o = ((t *) zend_object_store_get_object(getThis() TSRMLS_CC))
-# define OBJ_PROP(o) o->zo.properties
-# define DCL_PROP(a, t, n, v) zend_declare_property_ ##t(ce, (#n), sizeof(#n), (v), (ZEND_ACC_ ##a) TSRMLS_CC)
-# define UPD_PROP(o, t, n, v) zend_update_property_ ##t(o->zo.ce, getThis(), (#n), sizeof(#n), (v) TSRMLS_CC)
-# define GET_PROP(o, n) zend_read_property(o->zo.ce, getThis(), (#n), sizeof(#n), 0 TSRMLS_CC)
-
-/* {{{ HTTPi */
-
-zend_class_entry *httpi_ce;
-
-#define HTTPi_ME(me, al, ai) ZEND_FENTRY(me, ZEND_FN(al), ai, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
-
-zend_function_entry httpi_class_methods[] = {
- HTTPi_ME(date, http_date, NULL)
- HTTPi_ME(absoluteURI, http_absolute_uri, NULL)
- HTTPi_ME(negotiateLanguage, http_negotiate_language, NULL)
- HTTPi_ME(negotiateCharset, http_negotiate_charset, NULL)
- HTTPi_ME(redirect, http_redirect, NULL)
- HTTPi_ME(sendStatus, http_send_status, NULL)
- HTTPi_ME(sendLastModified, http_send_last_modified, NULL)
- HTTPi_ME(matchModified, http_match_modified, NULL)
- HTTPi_ME(matchEtag, http_match_etag, NULL)
- HTTPi_ME(cacheLastModified, http_cache_last_modified, NULL)
- HTTPi_ME(cacheEtag, http_cache_etag, NULL)
- HTTPi_ME(chunkedDecode, http_chunked_decode, NULL)
- HTTPi_ME(splitResponse, http_split_response, NULL)
- HTTPi_ME(parseHeaders, http_parse_headers, NULL)
- HTTPi_ME(getRequestHeaders, http_get_request_headers, NULL)
+/* {{{ HttpUtil */
+
+zend_class_entry *http_util_ce;
+
+#define HTTP_UTIL_ME(me, al, ai) ZEND_FENTRY(me, ZEND_FN(al), ai, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
+
+zend_function_entry http_util_class_methods[] = {
+ HTTP_UTIL_ME(date, http_date, NULL)
+ HTTP_UTIL_ME(absoluteURI, http_absolute_uri, NULL)
+ HTTP_UTIL_ME(negotiateLanguage, http_negotiate_language, NULL)
+ HTTP_UTIL_ME(negotiateCharset, http_negotiate_charset, NULL)
+ HTTP_UTIL_ME(redirect, http_redirect, NULL)
+ HTTP_UTIL_ME(sendStatus, http_send_status, NULL)
+ HTTP_UTIL_ME(sendLastModified, http_send_last_modified, NULL)
+ HTTP_UTIL_ME(sendContentType, http_send_content_type, NULL)
+ HTTP_UTIL_ME(sendContentDisposition, http_send_content_disposition, NULL)
+ HTTP_UTIL_ME(matchModified, http_match_modified, NULL)
+ HTTP_UTIL_ME(matchEtag, http_match_etag, NULL)
+ HTTP_UTIL_ME(cacheLastModified, http_cache_last_modified, NULL)
+ HTTP_UTIL_ME(cacheEtag, http_cache_etag, NULL)
+ HTTP_UTIL_ME(chunkedDecode, http_chunked_decode, NULL)
+ HTTP_UTIL_ME(splitResponse, http_split_response, NULL)
+ HTTP_UTIL_ME(parseHeaders, http_parse_headers, NULL)
+ HTTP_UTIL_ME(getRequestHeaders, http_get_request_headers, NULL)