diff options
Diffstat (limited to 'ext/soap')
-rw-r--r-- | ext/soap/soap.c | 33 | ||||
-rw-r--r-- | ext/soap/soap.stub.php | 2 | ||||
-rw-r--r-- | ext/soap/soap_arginfo.h | 63 |
3 files changed, 70 insertions, 28 deletions
diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 6466b157ce..49815082a8 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -166,13 +166,6 @@ ZEND_DECLARE_MODULE_GLOBALS(soap) static void (*old_error_handler)(int, const char *, const uint32_t, zend_string *); -#define PHP_SOAP_SERVER_CLASSNAME "SoapServer" -#define PHP_SOAP_CLIENT_CLASSNAME "SoapClient" -#define PHP_SOAP_VAR_CLASSNAME "SoapVar" -#define PHP_SOAP_FAULT_CLASSNAME "SoapFault" -#define PHP_SOAP_PARAM_CLASSNAME "SoapParam" -#define PHP_SOAP_HEADER_CLASSNAME "SoapHeader" - PHP_RINIT_FUNCTION(soap); PHP_MINIT_FUNCTION(soap); PHP_MSHUTDOWN_FUNCTION(soap); @@ -361,39 +354,27 @@ static void delete_hashtable_res(zend_resource *res) PHP_MINIT_FUNCTION(soap) { - zend_class_entry ce; - /* TODO: add ini entry for always use soap errors */ php_soap_prepare_globals(); ZEND_INIT_MODULE_GLOBALS(soap, php_soap_init_globals, NULL); REGISTER_INI_ENTRIES(); /* Register SoapClient class */ - /* BIG NOTE : THIS EMITS AN COMPILATION WARNING UNDER ZE2 - handle_function_call deprecated. - soap_call_function_handler should be of type zend_function, not (*handle_function_call). - */ - { - INIT_CLASS_ENTRY(ce, PHP_SOAP_CLIENT_CLASSNAME, class_SoapClient_methods); - soap_class_entry = zend_register_internal_class(&ce); - } + soap_class_entry = register_class_SoapClient(); + /* Register SoapVar class */ - INIT_CLASS_ENTRY(ce, PHP_SOAP_VAR_CLASSNAME, class_SoapVar_methods); - soap_var_class_entry = zend_register_internal_class(&ce); + soap_var_class_entry = register_class_SoapVar(); /* Register SoapServer class */ - INIT_CLASS_ENTRY(ce, PHP_SOAP_SERVER_CLASSNAME, class_SoapServer_methods); - soap_server_class_entry = zend_register_internal_class(&ce); + soap_server_class_entry = register_class_SoapServer(); /* Register SoapFault class */ - INIT_CLASS_ENTRY(ce, PHP_SOAP_FAULT_CLASSNAME, class_SoapFault_methods); - soap_fault_class_entry = zend_register_internal_class_ex(&ce, zend_ce_exception); + soap_fault_class_entry = register_class_SoapFault(zend_ce_exception); /* Register SoapParam class */ - INIT_CLASS_ENTRY(ce, PHP_SOAP_PARAM_CLASSNAME, class_SoapParam_methods); - soap_param_class_entry = zend_register_internal_class(&ce); + soap_param_class_entry = register_class_SoapParam(); - INIT_CLASS_ENTRY(ce, PHP_SOAP_HEADER_CLASSNAME, class_SoapHeader_methods); - soap_header_class_entry = zend_register_internal_class(&ce); + soap_header_class_entry = register_class_SoapHeader(); le_sdl = zend_register_list_destructors_ex(delete_sdl_res, NULL, "SOAP SDL", module_number); le_url = zend_register_list_destructors_ex(delete_url_res, NULL, "SOAP URL", module_number); diff --git a/ext/soap/soap.stub.php b/ext/soap/soap.stub.php index 01e41b7e87..1e92dca751 100644 --- a/ext/soap/soap.stub.php +++ b/ext/soap/soap.stub.php @@ -1,6 +1,6 @@ <?php -/** @generate-function-entries */ +/** @generate-class-entries */ function use_soap_error_handler(bool $enable = true): bool {} diff --git a/ext/soap/soap_arginfo.h b/ext/soap/soap_arginfo.h index da80ca6fdf..06dce3c891 100644 --- a/ext/soap/soap_arginfo.h +++ b/ext/soap/soap_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: c0d32b2d8f3c39203b437a01dc79cd4e934dc9f7 */ + * Stub hash: b4f2354707bc7b992a3574f820edb329b16dd49e */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_use_soap_error_handler, 0, 0, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, enable, _IS_BOOL, 0, "true") @@ -230,3 +230,64 @@ static const zend_function_entry class_SoapClient_methods[] = { ZEND_ME(SoapClient, __setLocation, arginfo_class_SoapClient___setLocation, ZEND_ACC_PUBLIC) ZEND_FE_END }; + +zend_class_entry *register_class_SoapParam() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "SoapParam", class_SoapParam_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + + return class_entry; +} + +zend_class_entry *register_class_SoapHeader() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "SoapHeader", class_SoapHeader_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + + return class_entry; +} + +zend_class_entry *register_class_SoapFault(zend_class_entry *class_entry_Exception) +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "SoapFault", class_SoapFault_methods); + class_entry = zend_register_internal_class_ex(&ce, class_entry_Exception); + + return class_entry; +} + +zend_class_entry *register_class_SoapVar() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "SoapVar", class_SoapVar_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + + return class_entry; +} + +zend_class_entry *register_class_SoapServer() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "SoapServer", class_SoapServer_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + + return class_entry; +} + +zend_class_entry *register_class_SoapClient() +{ + zend_class_entry ce, *class_entry; + + INIT_CLASS_ENTRY(ce, "SoapClient", class_SoapClient_methods); + class_entry = zend_register_internal_class_ex(&ce, NULL); + + return class_entry; +} + |