mirror of
https://github.com/php/php-src.git
synced 2026-04-14 19:41:05 +02:00
Fixed proto & folder mark
This commit is contained in:
115
ext/soap/soap.c
115
ext/soap/soap.c
@@ -852,6 +852,7 @@ PHP_METHOD(SoapHeader, SoapHeader)
|
||||
php_error_docref(NULL, E_WARNING, "Invalid actor");
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto object SoapFault::SoapFault(string faultcode, string faultstring [, string faultactor [, mixed detail [, string faultname [, mixed headerfault]]]])
|
||||
SoapFault constructor */
|
||||
@@ -904,7 +905,6 @@ PHP_METHOD(SoapFault, SoapFault)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto object SoapFault::SoapFault(string faultcode, string faultstring [, string faultactor [, mixed detail [, string faultname [, mixed headerfault]]]])
|
||||
SoapFault constructor */
|
||||
PHP_METHOD(SoapFault, __toString)
|
||||
@@ -1000,7 +1000,7 @@ PHP_METHOD(SoapVar, SoapVar)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static HashTable* soap_create_typemap(sdlPtr sdl, HashTable *ht)
|
||||
static HashTable* soap_create_typemap(sdlPtr sdl, HashTable *ht) /* {{{ */
|
||||
{
|
||||
zval *tmp;
|
||||
HashTable *ht2;
|
||||
@@ -1102,7 +1102,7 @@ static HashTable* soap_create_typemap(sdlPtr sdl, HashTable *ht)
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
return typemap;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto object SoapServer::SoapServer(mixed wsdl [, array options])
|
||||
SoapServer constructor */
|
||||
@@ -1970,7 +1970,6 @@ fail:
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ proto SoapServer::fault ( staring code, string string [, string actor [, mixed details [, string name]]] )
|
||||
Issue SoapFault indicating an error */
|
||||
PHP_METHOD(SoapServer, fault)
|
||||
@@ -1999,6 +1998,7 @@ PHP_METHOD(SoapServer, fault)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto SoapServer::addSoapHeader(SoapHeader $object) */
|
||||
PHP_METHOD(SoapServer, addSoapHeader)
|
||||
{
|
||||
soapServicePtr service;
|
||||
@@ -2029,8 +2029,9 @@ PHP_METHOD(SoapServer, addSoapHeader)
|
||||
|
||||
SOAP_SERVER_END_CODE();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeader *hdr)
|
||||
static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeader *hdr) /* {{{ */
|
||||
{
|
||||
int soap_version;
|
||||
xmlChar *buf;
|
||||
@@ -2078,8 +2079,9 @@ static void soap_server_fault_ex(sdlFunctionPtr function, zval* fault, soapHeade
|
||||
xmlFree(buf);
|
||||
zend_clear_exception();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void soap_server_fault(char* code, char* string, char *actor, zval* details, char* name)
|
||||
static void soap_server_fault(char* code, char* string, char *actor, zval* details, char* name) /* {{{ */
|
||||
{
|
||||
zval ret;
|
||||
|
||||
@@ -2089,8 +2091,9 @@ static void soap_server_fault(char* code, char* string, char *actor, zval* detai
|
||||
soap_server_fault_ex(NULL, &ret, NULL);
|
||||
zend_bailout();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void soap_error_handler(int error_num, const char *error_filename, const uint32_t error_lineno, const char *format, va_list args)
|
||||
static void soap_error_handler(int error_num, const char *error_filename, const uint32_t error_lineno, const char *format, va_list args) /* {{{ */
|
||||
{
|
||||
zend_bool _old_in_compilation;
|
||||
zend_execute_data *_old_current_execute_data;
|
||||
@@ -2225,7 +2228,9 @@ static void soap_error_handler(int error_num, const char *error_filename, const
|
||||
}
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto use_soap_error_handler([bool $handler = TRUE]) */
|
||||
PHP_FUNCTION(use_soap_error_handler)
|
||||
{
|
||||
zend_bool handler = 1;
|
||||
@@ -2235,7 +2240,9 @@ PHP_FUNCTION(use_soap_error_handler)
|
||||
SOAP_GLOBAL(use_soap_error_handler) = handler;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto is_soap_fault(mixed $object) */
|
||||
PHP_FUNCTION(is_soap_fault)
|
||||
{
|
||||
zval *fault;
|
||||
@@ -2247,6 +2254,7 @@ PHP_FUNCTION(is_soap_fault)
|
||||
}
|
||||
RETURN_FALSE
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* SoapClient functions */
|
||||
|
||||
@@ -2482,7 +2490,7 @@ PHP_METHOD(SoapClient, SoapClient)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *action, int version, int one_way, zval *response)
|
||||
static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *action, int version, int one_way, zval *response) /* {{{ */
|
||||
{
|
||||
int ret = TRUE;
|
||||
char *buf;
|
||||
@@ -2560,7 +2568,8 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act
|
||||
ret = FALSE;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void do_soap_call(zend_execute_data *execute_data,
|
||||
zval* this_ptr,
|
||||
@@ -2574,7 +2583,7 @@ static void do_soap_call(zend_execute_data *execute_data,
|
||||
char* call_uri,
|
||||
HashTable* soap_headers,
|
||||
zval* output_headers
|
||||
)
|
||||
) /* {{{ */
|
||||
{
|
||||
zval *tmp;
|
||||
zval *trace;
|
||||
@@ -2778,8 +2787,9 @@ static void do_soap_call(zend_execute_data *execute_data,
|
||||
}
|
||||
SOAP_CLIENT_END_CODE();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void verify_soap_headers_array(HashTable *ht)
|
||||
static void verify_soap_headers_array(HashTable *ht) /* {{{ */
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
@@ -2790,7 +2800,7 @@ static void verify_soap_headers_array(HashTable *ht)
|
||||
}
|
||||
} ZEND_HASH_FOREACH_END();
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
|
||||
/* {{{ proto mixed SoapClient::__call(string function_name, array arguments [, array options [, array input_headers [, array output_headers]]])
|
||||
Calls a SOAP function */
|
||||
@@ -3157,8 +3167,6 @@ PHP_METHOD(SoapClient, __setSoapHeaders)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
|
||||
/* {{{ proto string SoapClient::__setLocation([string new_location])
|
||||
Sets the location option (the endpoint URL that will be touched by the
|
||||
following SOAP requests).
|
||||
@@ -3190,22 +3198,24 @@ PHP_METHOD(SoapClient, __setLocation)
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void clear_soap_fault(zval *obj)
|
||||
static void clear_soap_fault(zval *obj) /* {{{ */
|
||||
{
|
||||
if (obj != NULL && Z_TYPE_P(obj) == IS_OBJECT) {
|
||||
zend_hash_str_del(Z_OBJPROP_P(obj), "__soap_fault", sizeof("__soap_fault")-1);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void add_soap_fault_ex(zval *fault, zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail)
|
||||
static void add_soap_fault_ex(zval *fault, zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail) /* {{{ */
|
||||
{
|
||||
ZVAL_NULL(fault);
|
||||
set_soap_fault(fault, NULL, fault_code, fault_string, fault_actor, fault_detail, NULL);
|
||||
add_property_zval(obj, "__soap_fault", fault);
|
||||
Z_DELREF_P(fault);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
void add_soap_fault(zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail)
|
||||
void add_soap_fault(zval *obj, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail) /* {{{ */
|
||||
{
|
||||
zval fault;
|
||||
|
||||
@@ -3214,8 +3224,9 @@ void add_soap_fault(zval *obj, char *fault_code, char *fault_string, char *fault
|
||||
add_property_zval(obj, "__soap_fault", &fault);
|
||||
Z_DELREF(fault);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void set_soap_fault(zval *obj, char *fault_code_ns, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail, char *name)
|
||||
static void set_soap_fault(zval *obj, char *fault_code_ns, char *fault_code, char *fault_string, char *fault_actor, zval *fault_detail, char *name) /* {{{ */
|
||||
{
|
||||
if (Z_TYPE_P(obj) != IS_OBJECT) {
|
||||
object_init_ex(obj, soap_fault_class_entry);
|
||||
@@ -3267,8 +3278,9 @@ static void set_soap_fault(zval *obj, char *fault_code_ns, char *fault_code, cha
|
||||
add_property_string(obj, "_name", name);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void deserialize_parameters(xmlNodePtr params, sdlFunctionPtr function, int *num_params, zval **parameters)
|
||||
static void deserialize_parameters(xmlNodePtr params, sdlFunctionPtr function, int *num_params, zval **parameters) /* {{{ */
|
||||
{
|
||||
int cur_param = 0,num_of_params = 0;
|
||||
zval *tmp_parameters = NULL;
|
||||
@@ -3355,8 +3367,9 @@ static void deserialize_parameters(xmlNodePtr params, sdlFunctionPtr function, i
|
||||
(*parameters) = tmp_parameters;
|
||||
(*num_params) = num_of_params;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static sdlFunctionPtr find_function(sdlPtr sdl, xmlNodePtr func, zval* function_name)
|
||||
static sdlFunctionPtr find_function(sdlPtr sdl, xmlNodePtr func, zval* function_name) /* {{{ */
|
||||
{
|
||||
sdlFunctionPtr function;
|
||||
|
||||
@@ -3383,8 +3396,9 @@ static sdlFunctionPtr find_function(sdlPtr sdl, xmlNodePtr func, zval* function_
|
||||
|
||||
return function;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, char* actor, zval *function_name, int *num_params, zval **parameters, int *version, soapHeader **headers)
|
||||
static sdlFunctionPtr deserialize_function_call(sdlPtr sdl, xmlDocPtr request, char* actor, zval *function_name, int *num_params, zval **parameters, int *version, soapHeader **headers) /* {{{ */
|
||||
{
|
||||
char* envelope_ns = NULL;
|
||||
xmlNodePtr trav,env,head,body,func;
|
||||
@@ -3644,8 +3658,9 @@ ignore_header:
|
||||
|
||||
return function;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void set_soap_header_attributes(xmlNodePtr h, HashTable *ht, int version)
|
||||
static void set_soap_header_attributes(xmlNodePtr h, HashTable *ht, int version) /* {{{ */
|
||||
{
|
||||
zval *tmp;
|
||||
|
||||
@@ -3681,8 +3696,9 @@ static void set_soap_header_attributes(xmlNodePtr h, HashTable *ht, int version)
|
||||
}
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, char *function_name, char *uri, zval *ret, int version, int main, xmlNodePtr *node)
|
||||
static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, char *function_name, char *uri, zval *ret, int version, int main, xmlNodePtr *node) /* {{{ */
|
||||
{
|
||||
xmlNodePtr method = NULL, param;
|
||||
sdlParamPtr parameter = NULL;
|
||||
@@ -3781,9 +3797,10 @@ static int serialize_response_call2(xmlNodePtr body, sdlFunctionPtr function, ch
|
||||
*node = method;
|
||||
}
|
||||
return use;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function_name, char *uri, zval *ret, soapHeader* headers, int version)
|
||||
static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function_name, char *uri, zval *ret, soapHeader* headers, int version) /* {{{ */
|
||||
{
|
||||
xmlDocPtr doc;
|
||||
xmlNodePtr envelope = NULL, body, param;
|
||||
@@ -4141,8 +4158,9 @@ static xmlDocPtr serialize_response_call(sdlFunctionPtr function, char *function
|
||||
}
|
||||
return doc;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function, char *function_name, char *uri, zval *arguments, int arg_count, int version, HashTable *soap_headers)
|
||||
static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function, char *function_name, char *uri, zval *arguments, int arg_count, int version, HashTable *soap_headers) /* {{{ */
|
||||
{
|
||||
xmlDoc *doc;
|
||||
xmlNodePtr envelope = NULL, body, method = NULL, head = NULL;
|
||||
@@ -4335,8 +4353,9 @@ static xmlDocPtr serialize_function_call(zval *this_ptr, sdlFunctionPtr function
|
||||
|
||||
return doc;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static xmlNodePtr serialize_parameter(sdlParamPtr param, zval *param_val, int index, char *name, int style, xmlNodePtr parent)
|
||||
static xmlNodePtr serialize_parameter(sdlParamPtr param, zval *param_val, int index, char *name, int style, xmlNodePtr parent) /* {{{ */
|
||||
{
|
||||
char *paramName;
|
||||
xmlNodePtr xmlParam;
|
||||
@@ -4371,8 +4390,9 @@ static xmlNodePtr serialize_parameter(sdlParamPtr param, zval *param_val, int in
|
||||
|
||||
return xmlParam;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static xmlNodePtr serialize_zval(zval *val, sdlParamPtr param, char *paramName, int style, xmlNodePtr parent)
|
||||
static xmlNodePtr serialize_zval(zval *val, sdlParamPtr param, char *paramName, int style, xmlNodePtr parent) /* {{{ */
|
||||
{
|
||||
xmlNodePtr xmlParam;
|
||||
encodePtr enc;
|
||||
@@ -4402,8 +4422,9 @@ static xmlNodePtr serialize_zval(zval *val, sdlParamPtr param, char *paramName,
|
||||
}
|
||||
return xmlParam;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static sdlParamPtr get_param(sdlFunctionPtr function, char *param_name, int index, int response)
|
||||
static sdlParamPtr get_param(sdlFunctionPtr function, char *param_name, int index, int response) /* {{{ */
|
||||
{
|
||||
sdlParamPtr tmp;
|
||||
HashTable *ht;
|
||||
@@ -4439,8 +4460,9 @@ static sdlParamPtr get_param(sdlFunctionPtr function, char *param_name, int inde
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static sdlFunctionPtr get_function(sdlPtr sdl, const char *function_name)
|
||||
static sdlFunctionPtr get_function(sdlPtr sdl, const char *function_name) /* {{{ */
|
||||
{
|
||||
sdlFunctionPtr tmp;
|
||||
|
||||
@@ -4459,8 +4481,9 @@ static sdlFunctionPtr get_function(sdlPtr sdl, const char *function_name)
|
||||
efree(str);
|
||||
return NULL;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static sdlFunctionPtr get_doc_function(sdlPtr sdl, xmlNodePtr params)
|
||||
static sdlFunctionPtr get_doc_function(sdlPtr sdl, xmlNodePtr params) /* {{{ */
|
||||
{
|
||||
if (sdl) {
|
||||
sdlFunctionPtr tmp;
|
||||
@@ -4511,8 +4534,9 @@ static sdlFunctionPtr get_doc_function(sdlPtr sdl, xmlNodePtr params)
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void function_to_string(sdlFunctionPtr function, smart_str *buf)
|
||||
static void function_to_string(sdlFunctionPtr function, smart_str *buf) /* {{{ */
|
||||
{
|
||||
int i = 0;
|
||||
sdlParamPtr param;
|
||||
@@ -4572,8 +4596,9 @@ static void function_to_string(sdlFunctionPtr function, smart_str *buf)
|
||||
smart_str_appendc(buf, ')');
|
||||
smart_str_0(buf);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void model_to_string(sdlContentModelPtr model, smart_str *buf, int level)
|
||||
static void model_to_string(sdlContentModelPtr model, smart_str *buf, int level) /* {{{ */
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -4604,8 +4629,9 @@ static void model_to_string(sdlContentModelPtr model, smart_str *buf, int level)
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void type_to_string(sdlTypePtr type, smart_str *buf, int level)
|
||||
static void type_to_string(sdlTypePtr type, smart_str *buf, int level) /* {{{ */
|
||||
{
|
||||
int i;
|
||||
smart_str spaces = {0};
|
||||
@@ -4777,13 +4803,15 @@ static void type_to_string(sdlTypePtr type, smart_str *buf, int level)
|
||||
smart_str_free(&spaces);
|
||||
smart_str_0(buf);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void delete_url(void *handle)
|
||||
static void delete_url(void *handle) /* {{{ */
|
||||
{
|
||||
php_url_free((php_url*)handle);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void delete_service(void *data)
|
||||
static void delete_service(void *data) /* {{{ */
|
||||
{
|
||||
soapServicePtr service = (soapServicePtr)data;
|
||||
|
||||
@@ -4824,10 +4852,23 @@ static void delete_service(void *data)
|
||||
zval_ptr_dtor(&service->soap_object);
|
||||
efree(service);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void delete_hashtable(void *data)
|
||||
static void delete_hashtable(void *data) /* {{{ */
|
||||
{
|
||||
HashTable *ht = (HashTable*)data;
|
||||
zend_hash_destroy(ht);
|
||||
efree(ht);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* tab-width: 4
|
||||
* c-basic-offset: 4
|
||||
* indent-tabs-mode: t
|
||||
* End:
|
||||
* vim600: sw=4 ts=4 fdm=marker
|
||||
* vim<600: sw=4 ts=4
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user