Lines Matching refs:ret
31 static zval *to_zval_double(zval* ret, encodeTypePtr type, xmlNodePtr data);
32 static zval *to_zval_long(zval* ret, encodeTypePtr type, xmlNodePtr data);
33 static zval *to_zval_bool(zval* ret, encodeTypePtr type, xmlNodePtr data);
34 static zval *to_zval_string(zval* ret, encodeTypePtr type, xmlNodePtr data);
35 static zval *to_zval_stringr(zval* ret, encodeTypePtr type, xmlNodePtr data);
36 static zval *to_zval_stringc(zval* ret, encodeTypePtr type, xmlNodePtr data);
37 static zval *to_zval_map(zval* ret, encodeTypePtr type, xmlNodePtr data);
38 static zval *to_zval_null(zval* ret, encodeTypePtr type, xmlNodePtr data);
39 static zval *to_zval_base64(zval* ret, encodeTypePtr type, xmlNodePtr data);
40 static zval *to_zval_hexbin(zval* ret, encodeTypePtr type, xmlNodePtr data);
73 static zval *to_zval_object(zval *ret, encodeTypePtr type, xmlNodePtr data);
74 static zval *to_zval_array(zval *ret, encodeTypePtr type, xmlNodePtr data);
79 static zval *to_zval_any(zval *ret, encodeTypePtr type, xmlNodePtr data);
83 static zval *guess_zval_convert(zval *ret, encodeTypePtr type, xmlNodePtr data);
95 static void get_type_str(xmlNodePtr node, const char* ns, const char* type, smart_str* ret);
120 ZVAL_NULL(ret); \
121 return ret; \
126 ZVAL_NULL(ret); \
127 return ret; \
519 static zval *master_to_zval_int(zval *ret, encodePtr encode, xmlNodePtr data) in master_to_zval_int() argument
563 ret = encode->to_zval(ret, &encode->details, data); in master_to_zval_int()
565 return ret; in master_to_zval_int()
568 zval *master_to_zval(zval *ret, encodePtr encode, xmlNodePtr data) in master_to_zval() argument
599 return master_to_zval_int(ret, encode, data); in master_to_zval()
604 xmlNodePtr ret = NULL; in to_xml_user() local
616 ret = xmlDocCopyNode(doc->children, parent->doc, 1); in to_xml_user()
623 if (!ret) { in to_xml_user()
624 ret = xmlNewNode(NULL, BAD_CAST("BOGUS")); in to_xml_user()
626 xmlAddChild(parent, ret); in to_xml_user()
628 set_ns_and_type(ret, type); in to_xml_user()
630 return ret; in to_xml_user()
633 zval *to_zval_user(zval *ret, encodeTypePtr type, xmlNodePtr node) in to_zval_user() argument
647 if (call_user_function(NULL, NULL, &type->map->to_zval, ret, 1, &data) == FAILURE) { in to_zval_user()
650 ZVAL_NULL(ret); in to_zval_user()
654 ZVAL_NULL(ret); in to_zval_user()
656 return ret; in to_zval_user()
661 static zval *to_zval_string(zval *ret, encodeTypePtr type, xmlNodePtr data) in to_zval_string() argument
663 ZVAL_NULL(ret); in to_zval_string()
664 FIND_XML_NULL(data, ret); in to_zval_string()
673 ZVAL_STRING(ret, (char*)xmlBufferContent(out)); in to_zval_string()
675 ZVAL_STRING(ret, (char*)data->children->content); in to_zval_string()
680 ZVAL_STRING(ret, (char*)data->children->content); in to_zval_string()
683 ZVAL_STRING(ret, (char*)data->children->content); in to_zval_string()
688 ZVAL_EMPTY_STRING(ret); in to_zval_string()
690 return ret; in to_zval_string()
693 static zval *to_zval_stringr(zval *ret, encodeTypePtr type, xmlNodePtr data) in to_zval_stringr() argument
695 ZVAL_NULL(ret); in to_zval_stringr()
696 FIND_XML_NULL(data, ret); in to_zval_stringr()
706 ZVAL_STRING(ret, (char*)xmlBufferContent(out)); in to_zval_stringr()
708 ZVAL_STRING(ret, (char*)data->children->content); in to_zval_stringr()
713 ZVAL_STRING(ret, (char*)data->children->content); in to_zval_stringr()
716 ZVAL_STRING(ret, (char*)data->children->content); in to_zval_stringr()
721 ZVAL_EMPTY_STRING(ret); in to_zval_stringr()
723 return ret; in to_zval_stringr()
726 static zval *to_zval_stringc(zval *ret, encodeTypePtr type, xmlNodePtr data) in to_zval_stringc() argument
728 ZVAL_NULL(ret); in to_zval_stringc()
729 FIND_XML_NULL(data, ret); in to_zval_stringc()
739 ZVAL_STRING(ret, (char*)xmlBufferContent(out)); in to_zval_stringc()
741 ZVAL_STRING(ret, (char*)data->children->content); in to_zval_stringc()
746 ZVAL_STRING(ret, (char*)data->children->content); in to_zval_stringc()
749 ZVAL_STRING(ret, (char*)data->children->content); in to_zval_stringc()
754 ZVAL_EMPTY_STRING(ret); in to_zval_stringc()
756 return ret; in to_zval_stringc()
759 static zval *to_zval_base64(zval *ret, encodeTypePtr type, xmlNodePtr data) in to_zval_base64() argument
763 ZVAL_NULL(ret); in to_zval_base64()
764 FIND_XML_NULL(data, ret); in to_zval_base64()
772 ZVAL_STR(ret, str); in to_zval_base64()
778 ZVAL_STR(ret, str); in to_zval_base64()
783 ZVAL_EMPTY_STRING(ret); in to_zval_base64()
785 return ret; in to_zval_base64()
788 static zval *to_zval_hexbin(zval *ret, encodeTypePtr type, xmlNodePtr data) in to_zval_hexbin() argument
794 ZVAL_NULL(ret); in to_zval_hexbin()
795 FIND_XML_NULL(data, ret); in to_zval_hexbin()
801 return ret; in to_zval_hexbin()
827 ZVAL_NEW_STR(ret, str); in to_zval_hexbin()
829 ZVAL_EMPTY_STRING(ret); in to_zval_hexbin()
831 return ret; in to_zval_hexbin()
879 xmlNodePtr ret, text; in to_xml_string() local
881 ret = xmlNewNode(NULL, BAD_CAST("BOGUS")); in to_xml_string()
882 xmlAddChild(parent, ret); in to_xml_string()
883 FIND_ZVAL_NULL(data, ret, style); in to_xml_string()
946 xmlAddChild(ret, text); in to_xml_string()
954 set_ns_and_type(ret, type); in to_xml_string()
956 return ret; in to_xml_string()
961 xmlNodePtr ret, text; in to_xml_base64() local
963 ret = xmlNewNode(NULL, BAD_CAST("BOGUS")); in to_xml_base64()
964 xmlAddChild(parent, ret); in to_xml_base64()
965 FIND_ZVAL_NULL(data, ret, style); in to_xml_base64()
972 xmlAddChild(ret, text); in to_xml_base64()
976 set_ns_and_type(ret, type); in to_xml_base64()
978 return ret; in to_xml_base64()
984 xmlNodePtr ret, text; in to_xml_hexbin() local
989 ret = xmlNewNode(NULL, BAD_CAST("BOGUS")); in to_xml_hexbin()
990 xmlAddChild(parent, ret); in to_xml_hexbin()
991 FIND_ZVAL_NULL(data, ret, style); in to_xml_hexbin()
1006 xmlAddChild(ret, text); in to_xml_hexbin()
1013 set_ns_and_type(ret, type); in to_xml_hexbin()
1015 return ret; in to_xml_hexbin()
1018 static zval *to_zval_double(zval *ret, encodeTypePtr type, xmlNodePtr data) in to_zval_double() argument
1020 ZVAL_NULL(ret); in to_zval_double()
1021 FIND_XML_NULL(data, ret); in to_zval_double()
1031 ZVAL_DOUBLE(ret, (double) lval); in to_zval_double()
1034 ZVAL_DOUBLE(ret, dval); in to_zval_double()
1038 ZVAL_DOUBLE(ret, php_get_nan()); in to_zval_double()
1040 ZVAL_DOUBLE(ret, php_get_inf()); in to_zval_double()
1042 ZVAL_DOUBLE(ret, -php_get_inf()); in to_zval_double()
1051 ZVAL_NULL(ret); in to_zval_double()
1053 return ret; in to_zval_double()
1056 static zval *to_zval_long(zval *ret, encodeTypePtr type, xmlNodePtr data) in to_zval_long() argument
1058 ZVAL_NULL(ret); in to_zval_long()
1059 FIND_XML_NULL(data, ret); in to_zval_long()
1071 ZVAL_LONG(ret, lval); in to_zval_long()
1074 ZVAL_DOUBLE(ret, dval); in to_zval_long()
1083 ZVAL_NULL(ret); in to_zval_long()
1085 return ret; in to_zval_long()
1090 xmlNodePtr ret; in to_xml_long() local
1092 ret = xmlNewNode(NULL, BAD_CAST("BOGUS")); in to_xml_long()
1093 xmlAddChild(parent, ret); in to_xml_long()
1094 FIND_ZVAL_NULL(data, ret, style); in to_xml_long()
1100 xmlNodeSetContent(ret, BAD_CAST(s)); in to_xml_long()
1103 xmlNodeSetContentLen(ret, BAD_CAST(ZSTR_VAL(str)), ZSTR_LEN(str)); in to_xml_long()
1108 set_ns_and_type(ret, type); in to_xml_long()
1110 return ret; in to_xml_long()
1115 xmlNodePtr ret; in to_xml_double() local
1119 ret = xmlNewNode(NULL, BAD_CAST("BOGUS")); in to_xml_double()
1120 xmlAddChild(parent, ret); in to_xml_double()
1121 FIND_ZVAL_NULL(data, ret, style); in to_xml_double()
1127 xmlNodeSetContentLen(ret, BAD_CAST(str), strlen(str)); in to_xml_double()
1131 set_ns_and_type(ret, type); in to_xml_double()
1133 return ret; in to_xml_double()
1136 static zval *to_zval_bool(zval *ret, encodeTypePtr type, xmlNodePtr data) in to_zval_bool() argument
1138 ZVAL_NULL(ret); in to_zval_bool()
1139 FIND_XML_NULL(data, ret); in to_zval_bool()
1147 ZVAL_TRUE(ret); in to_zval_bool()
1151 ZVAL_FALSE(ret); in to_zval_bool()
1153 ZVAL_STRING(ret, (char*)data->children->content); in to_zval_bool()
1154 convert_to_boolean(ret); in to_zval_bool()
1160 ZVAL_NULL(ret); in to_zval_bool()
1162 return ret; in to_zval_bool()
1167 xmlNodePtr ret; in to_xml_bool() local
1169 ret = xmlNewNode(NULL, BAD_CAST("BOGUS")); in to_xml_bool()
1170 xmlAddChild(parent, ret); in to_xml_bool()
1171 FIND_ZVAL_NULL(data, ret, style); in to_xml_bool()
1174 xmlNodeSetContent(ret, BAD_CAST("true")); in to_xml_bool()
1176 xmlNodeSetContent(ret, BAD_CAST("false")); in to_xml_bool()
1180 set_ns_and_type(ret, type); in to_xml_bool()
1182 return ret; in to_xml_bool()
1186 static zval *to_zval_null(zval *ret, encodeTypePtr type, xmlNodePtr data) in to_zval_null() argument
1188 ZVAL_NULL(ret); in to_zval_null()
1189 return ret; in to_zval_null()
1194 xmlNodePtr ret; in to_xml_null() local
1196 ret = xmlNewNode(NULL, BAD_CAST("BOGUS")); in to_xml_null()
1197 xmlAddChild(parent, ret); in to_xml_null()
1199 set_xsi_nil(ret); in to_xml_null()
1201 return ret; in to_xml_null()
1234 static void model_to_zval_any(zval *ret, xmlNodePtr node) in model_to_zval_any() argument
1241 if (get_zval_property(ret, (char*)node->name, &rv) == NULL) { in model_to_zval_any()
1311 set_zval_property(ret, name ? name : "any", any); in model_to_zval_any()
1315 static void model_to_zval_object(zval *ret, sdlContentModelPtr model, xmlNodePtr data, sdlPtr sdl) in model_to_zval_object() argument
1383 set_zval_property(ret, model->u.element->name, &val); in model_to_zval_object()
1397 model_to_zval_object(ret, tmp, data, sdl); in model_to_zval_object()
1401 model_to_zval_any(ret, data->children); in model_to_zval_object()
1406 model_to_zval_object(ret, model->u.group->model, data, sdl); in model_to_zval_object()
1414 static zval *to_zval_object_ex(zval *ret, encodeTypePtr type, xmlNodePtr data, zend_class_entry *pc… in to_zval_object_ex() argument
1455 ZVAL_NULL(ret); in to_zval_object_ex()
1456 if (soap_check_xml_ref(ret, data)) { in to_zval_object_ex()
1457 return ret; in to_zval_object_ex()
1460 if (object_init_ex(ret, ce) != SUCCESS) { in to_zval_object_ex()
1461 return ret; in to_zval_object_ex()
1464 set_zval_property(ret, "_", &base); in to_zval_object_ex()
1466 ZVAL_NULL(ret); in to_zval_object_ex()
1467 FIND_XML_NULL(data, ret); in to_zval_object_ex()
1468 if (soap_check_xml_ref(ret, data)) { in to_zval_object_ex()
1469 return ret; in to_zval_object_ex()
1471 if (object_init_ex(ret, ce) != SUCCESS) { in to_zval_object_ex()
1472 return ret; in to_zval_object_ex()
1474 soap_add_xml_ref(ret, data); in to_zval_object_ex()
1485 if (soap_check_xml_ref(ret, data)) { in to_zval_object_ex()
1486 return ret; in to_zval_object_ex()
1498 to_zval_object_ex(ret, &sdlType->encode->details, data, ce); in to_zval_object_ex()
1500 master_to_zval_int(ret, sdlType->encode, data); in to_zval_object_ex()
1503 soap_add_xml_ref(ret, data); in to_zval_object_ex()
1505 redo_any = get_zval_property(ret, "any", &rv); in to_zval_object_ex()
1506 if (Z_TYPE_P(ret) == IS_OBJECT && ce != ZEND_STANDARD_CLASS_DEF_PTR) { in to_zval_object_ex()
1507 zend_object *zobj = Z_OBJ_P(ret); in to_zval_object_ex()
1513 ZVAL_NULL(ret); in to_zval_object_ex()
1514 if (soap_check_xml_ref(ret, data)) { in to_zval_object_ex()
1515 return ret; in to_zval_object_ex()
1518 if (object_init_ex(ret, ce) != SUCCESS) { in to_zval_object_ex()
1519 return ret; in to_zval_object_ex()
1521 soap_add_xml_ref(ret, data); in to_zval_object_ex()
1523 set_zval_property(ret, "_", &base); in to_zval_object_ex()
1526 ZVAL_NULL(ret); in to_zval_object_ex()
1527 FIND_XML_NULL(data, ret); in to_zval_object_ex()
1528 if (soap_check_xml_ref(ret, data)) { in to_zval_object_ex()
1529 return ret; in to_zval_object_ex()
1531 if (object_init_ex(ret, ce) != SUCCESS) { in to_zval_object_ex()
1532 return ret; in to_zval_object_ex()
1534 soap_add_xml_ref(ret, data); in to_zval_object_ex()
1537 model_to_zval_object(ret, sdlType->model, data, sdl); in to_zval_object_ex()
1539 if (!get_zval_property(ret, "any", &rv)) { in to_zval_object_ex()
1540 model_to_zval_any(ret, data->children); in to_zval_object_ex()
1541 soap_add_xml_ref(ret, data); in to_zval_object_ex()
1543 unset_zval_property(ret, "any"); in to_zval_object_ex()
1581 set_zval_property(ret, attr->name, &data); in to_zval_object_ex()
1587 ZVAL_NULL(ret); in to_zval_object_ex()
1588 FIND_XML_NULL(data, ret); in to_zval_object_ex()
1589 if (soap_check_xml_ref(ret, data)) { in to_zval_object_ex()
1590 return ret; in to_zval_object_ex()
1593 if (object_init_ex(ret, ce) != SUCCESS) { in to_zval_object_ex()
1594 return ret; in to_zval_object_ex()
1596 soap_add_xml_ref(ret, data); in to_zval_object_ex()
1607 prop = get_zval_property(ret, (char*)trav->name, &rv); in to_zval_object_ex()
1610 set_zval_property(ret, (char*)trav->name, &tmpVal); in to_zval_object_ex()
1616 set_zval_property(ret, (char*)trav->name, &arr); in to_zval_object_ex()
1625 set_zval_property(ret, (char*)trav->name, &arr); in to_zval_object_ex()
1637 return ret; in to_zval_object_ex()
1640 static zval *to_zval_object(zval *ret, encodeTypePtr type, xmlNodePtr data) in to_zval_object() argument
1642 return to_zval_object_ex(ret, type, data, NULL); in to_zval_object()
1783 int ret = 0; in model_to_xml_object() local
1790 ret = 1; in model_to_xml_object()
1793 return ret; in model_to_xml_object()
2507 static zval *to_zval_array(zval *ret, encodeTypePtr type, xmlNodePtr data) in to_zval_array() argument
2519 ZVAL_NULL(ret); in to_zval_array()
2520 FIND_XML_NULL(data, ret); in to_zval_array()
2655 array_init(ret); in to_zval_array()
2675 ar = ret; in to_zval_array()
2709 return ret; in to_zval_array()
2771 static zval *to_zval_map(zval *ret, encodeTypePtr type, xmlNodePtr data) in to_zval_map() argument
2776 ZVAL_NULL(ret); in to_zval_map()
2777 FIND_XML_NULL(data, ret); in to_zval_map()
2780 array_init(ret); in to_zval_map()
2801 zend_symtable_update(Z_ARRVAL_P(ret), Z_STR(key), &value); in to_zval_map()
2803 zend_hash_index_update(Z_ARRVAL_P(ret), Z_LVAL(key), &value); in to_zval_map()
2811 ZVAL_NULL(ret); in to_zval_map()
2813 return ret; in to_zval_map()
2820 xmlNodePtr ret; in guess_xml_convert() local
2827 ret = master_to_xml_int(enc, data, style, parent, 0); in guess_xml_convert()
2833 return ret; in guess_xml_convert()
2836 static zval *guess_zval_convert(zval *ret, encodeTypePtr type, xmlNodePtr data) in guess_zval_convert() argument
2893 master_to_zval_int(ret, enc, data); in guess_zval_convert()
2902 ZVAL_COPY_VALUE(Z_VAR_ENC_VALUE_P(&soapvar), ret); in guess_zval_convert()
2910 ZVAL_COPY_VALUE(ret, &soapvar); in guess_zval_convert()
2912 return ret; in guess_zval_convert()
3042 static zval* to_zval_list(zval *ret, encodeTypePtr enc, xmlNodePtr data) { in to_zval_list() argument
3044 return to_zval_stringc(ret, enc, data); in to_zval_list()
3048 xmlNodePtr ret; in to_xml_list() local
3060 ret = xmlNewNode(NULL, BAD_CAST("BOGUS")); in to_xml_list()
3061 xmlAddChild(parent, ret); in to_xml_list()
3062 FIND_ZVAL_NULL(data, ret, style); in to_xml_list()
3069 xmlNodePtr dummy = master_to_xml(list_enc, tmp, SOAP_LITERAL, ret); in to_xml_list()
3083 xmlNodeSetContentLen(ret, BAD_CAST(ZSTR_VAL(list.s)), ZSTR_LEN(list.s)); in to_xml_list()
3085 xmlNodeSetContentLen(ret, BAD_CAST(""), 0); in to_xml_list()
3110 dummy = master_to_xml(list_enc, &dummy_zval, SOAP_LITERAL, ret); in to_xml_list()
3127 xmlNodeSetContentLen(ret, BAD_CAST(ZSTR_VAL(list.s)), ZSTR_LEN(list.s)); in to_xml_list()
3129 xmlNodeSetContentLen(ret, BAD_CAST(""), 0); in to_xml_list()
3137 return ret; in to_xml_list()
3145 static zval* to_zval_union(zval *ret, encodeTypePtr enc, xmlNodePtr data) { in to_zval_union() argument
3147 return to_zval_list(ret, enc, data); in to_zval_union()
3155 static zval *to_zval_any(zval *ret, encodeTypePtr type, xmlNodePtr data) in to_zval_any() argument
3173 return master_to_zval_int(ret, sdl_type->encode, data); in to_zval_any()
3180 ZVAL_STRING(ret, (char*)xmlBufferContent(buf)); in to_zval_any()
3182 return ret; in to_zval_any()
3187 xmlNodePtr ret = NULL; in to_xml_any() local
3195 ret = master_to_xml(enc, el, style, parent); in to_xml_any()
3196 if (ret && in to_xml_any()
3197 ret->name != xmlStringTextNoenc) { in to_xml_any()
3198 xmlNodeSetName(ret, BAD_CAST(ZSTR_VAL(name))); in to_xml_any()
3201 return ret; in to_xml_any()
3205 ret = xmlNewTextLen(BAD_CAST(ZSTR_VAL(serialization)), ZSTR_LEN(serialization)); in to_xml_any()
3208 ret->name = xmlStringTextNoenc; in to_xml_any()
3209 ret->parent = parent; in to_xml_any()
3210 ret->doc = parent->doc; in to_xml_any()
3211 ret->prev = parent->last; in to_xml_any()
3212 ret->next = NULL; in to_xml_any()
3214 parent->last->next = ret; in to_xml_any()
3216 parent->children = ret; in to_xml_any()
3218 parent->last = ret; in to_xml_any()
3220 return ret; in to_xml_any()
3223 zval *sdl_guess_convert_zval(zval *ret, encodeTypePtr enc, xmlNodePtr data) in sdl_guess_convert_zval() argument
3229 return guess_zval_convert(ret, enc, data); in sdl_guess_convert_zval()
3263 return master_to_zval_int(ret, type->encode, data); in sdl_guess_convert_zval()
3265 return guess_zval_convert(ret, enc, data); in sdl_guess_convert_zval()
3269 return to_zval_list(ret, enc, data); in sdl_guess_convert_zval()
3271 return to_zval_union(ret, enc, data); in sdl_guess_convert_zval()
3278 return to_zval_array(ret, enc, data); in sdl_guess_convert_zval()
3280 return to_zval_object(ret, enc, data); in sdl_guess_convert_zval()
3283 return guess_zval_convert(ret, enc, data); in sdl_guess_convert_zval()
3290 xmlNodePtr ret = NULL; in sdl_guess_convert_xml() local
3295 ret = guess_xml_convert(enc, data, style, parent); in sdl_guess_convert_xml()
3297 set_ns_and_type(ret, enc); in sdl_guess_convert_xml()
3299 return ret; in sdl_guess_convert_xml()
3327 ret = master_to_xml(type->encode, data, style, parent); in sdl_guess_convert_xml()
3329 ret = guess_xml_convert(enc, data, style, parent); in sdl_guess_convert_xml()
3333 ret = to_xml_list(enc, data, style, parent); in sdl_guess_convert_xml()
3336 ret = to_xml_union(enc, data, style, parent); in sdl_guess_convert_xml()
3354 set_ns_and_type(ret, enc); in sdl_guess_convert_xml()
3356 return ret; in sdl_guess_convert_xml()
3373 …xmlNodePtr ret = get_node_with_attribute_recursive(data->doc->children, NULL, "id", (char*)&href->… in check_and_resolve_href() local
3374 if (!ret) { in check_and_resolve_href()
3377 return ret; in check_and_resolve_href()
3387 xmlNodePtr ret; in check_and_resolve_href() local
3394 …ret = get_node_with_attribute_recursive_ex(data->doc->children, NULL, NULL, "id", (char*)id, SOAP_… in check_and_resolve_href()
3395 if (!ret) { in check_and_resolve_href()
3397 } else if (ret == data) { in check_and_resolve_href()
3400 return ret; in check_and_resolve_href()
3675 static void get_type_str(xmlNodePtr node, const char* ns, const char* type, smart_str* ret) in get_type_str() argument
3688 smart_str_appends(ret, (char*)xmlns->prefix); in get_type_str()
3689 smart_str_appendc(ret, ':'); in get_type_str()
3691 smart_str_appendl(ret, type, strlen(type)); in get_type_str()
3692 smart_str_0(ret); in get_type_str()