2 +----------------------------------------------------------------------+
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.0 of the PHP license, that |
6 | is bundled with this package in the file LICENSE, and is available |
7 | through the world-wide-web at http://www.php.net/license/3_0.txt. |
8 | If you did not receive a copy of the PHP license and are unable to |
9 | obtain it through the world-wide-web, please send a note to |
10 | license@php.net so we can mail you a copy immediately. |
11 +----------------------------------------------------------------------+
12 | Copyright (c) 2004-2005 Michael Wallner <mike@php.net> |
13 +----------------------------------------------------------------------+
26 #include "zend_exceptions.h"
29 #include "php_http_std_defs.h"
30 #include "php_http_exception_object.h"
32 zend_class_entry
*http_exception_object_ce
;
33 zend_function_entry http_exception_object_fe
[] = {{NULL
, NULL
, NULL
}};
35 void _http_exception_object_init(INIT_FUNC_ARGS
)
37 HTTP_REGISTER_CLASS(HttpException
, http_exception_object
, zend_exception_get_default(), 0);
39 HTTP_LONG_CONSTANT("HTTP_E_UNKNOWN", HTTP_E_UNKOWN
);
40 HTTP_LONG_CONSTANT("HTTP_E_PARSE", HTTP_E_PARSE
);
41 HTTP_LONG_CONSTANT("HTTP_E_HEADER", HTTP_E_HEADER
);
42 HTTP_LONG_CONSTANT("HTTP_E_OBUFFER", HTTP_E_OBUFFER
);
43 HTTP_LONG_CONSTANT("HTTP_E_CURL", HTTP_E_CURL
);
44 HTTP_LONG_CONSTANT("HTTP_E_ENCODE", HTTP_E_ENCODE
);
45 HTTP_LONG_CONSTANT("HTTP_E_PARAM", HTTP_E_PARAM
);
46 HTTP_LONG_CONSTANT("HTTP_E_URL", HTTP_E_URL
);
47 HTTP_LONG_CONSTANT("HTTP_E_MSG", HTTP_E_MSG
);
50 zend_class_entry
*_http_exception_get_default()
52 return http_exception_object_ce
;
55 zend_class_entry
*_http_exception_get_for_code(long code
)
57 return http_exception_object_ce
;
67 * vim600: noet sw=4 ts=4 fdm=marker
68 * vim<600: noet sw=4 ts=4