X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_exception_object.h;h=df89e4f34dcdff111a59785cac64c55319e6f3d2;hp=423704a8c7b34fb889f25cd2a1960c80c1a5fb62;hb=ad5f896b03adaa073134a00108a9cdf00720673a;hpb=fcebff9b60cdeede7970f5b4bb7b01318b4415c3 diff --git a/php_http_exception_object.h b/php_http_exception_object.h index 423704a..df89e4f 100644 --- a/php_http_exception_object.h +++ b/php_http_exception_object.h @@ -1,16 +1,13 @@ /* - +----------------------------------------------------------------------+ - | PECL :: http | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.0 of the PHP license, that | - | is bundled with this package in the file LICENSE, and is available | - | through the world-wide-web at http://www.php.net/license/3_0.txt. | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Copyright (c) 2004-2005 Michael Wallner | - +----------------------------------------------------------------------+ + +--------------------------------------------------------------------+ + | 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-2010, Michael Wallner | + +--------------------------------------------------------------------+ */ /* $Id$ */ @@ -19,22 +16,35 @@ #define PHP_HTTP_EXCEPTION_OBJECT_H #ifdef ZEND_ENGINE_2 +#include "zend_exceptions.h" + +PHP_MINIT_FUNCTION(http_exception_object); + +#define HTTP_EX_DEF_CE http_exception_object_ce +#define HTTP_EX_CE(name) http_ ##name## _exception_object_ce + extern zend_class_entry *http_exception_object_ce; +extern zend_class_entry *HTTP_EX_CE(runtime); +extern zend_class_entry *HTTP_EX_CE(header); +extern zend_class_entry *HTTP_EX_CE(malformed_headers); +extern zend_class_entry *HTTP_EX_CE(request_method); +extern zend_class_entry *HTTP_EX_CE(message_type); +extern zend_class_entry *HTTP_EX_CE(invalid_param); +extern zend_class_entry *HTTP_EX_CE(encoding); +extern zend_class_entry *HTTP_EX_CE(request); +extern zend_class_entry *HTTP_EX_CE(request_pool); +extern zend_class_entry *HTTP_EX_CE(socket); +extern zend_class_entry *HTTP_EX_CE(response); +extern zend_class_entry *HTTP_EX_CE(url); extern zend_function_entry http_exception_object_fe[]; -#define http_exception_object_init _http_exception_object_init -extern void _http_exception_object_init(INIT_FUNC_ARGS); - #define http_exception_get_default _http_exception_get_default extern zend_class_entry *_http_exception_get_default(); -#define http_exception_throw() http_exception_throw_ex(0) -#define http_exception_throw_ex(code) http_exception_throw_ce_ex(NULL, code) -#define http_exception_throw_ce(ce) http_exception_throw_ce_ex(ce, 0) -#define http_exception_throw_ce_ex(ce, code) _http_exception_throw_ce_ex(ce, code TSRMLS_CC) -extern void _http_exception_throw_ce_ex(zend_class_entry *ce, int code TSRMLS_DC); +#define http_exception_get_for_code(c) _http_exception_get_for_code(c) +extern zend_class_entry *_http_exception_get_for_code(long code); -#define HTTP_E_UNKOWN 0 +PHP_METHOD(HttpException, __toString); #endif #endif