Lines Matching refs:model
1385 static void model_to_zval_object(zval *ret, sdlContentModelPtr model, xmlNodePtr data, sdlPtr sdl T… in model_to_zval_object() argument
1387 switch (model->kind) { in model_to_zval_object()
1389 if (model->u.element->name) { in model_to_zval_object()
1390 xmlNodePtr node = get_node(data->children, model->u.element->name); in model_to_zval_object()
1398 …if (model->u.element->fixed && strcmp(model->u.element->fixed, (char*)r_node->children->content) !… in model_to_zval_object()
1399 …ement '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.ele… in model_to_zval_object()
1401 val = master_to_zval(model->u.element->encode, r_node); in model_to_zval_object()
1402 } else if (model->u.element->fixed) { in model_to_zval_object()
1404 xmlNodeSetContent(dummy, BAD_CAST(model->u.element->fixed)); in model_to_zval_object()
1405 val = master_to_zval(model->u.element->encode, dummy); in model_to_zval_object()
1407 } else if (model->u.element->def && !model->u.element->nillable) { in model_to_zval_object()
1409 xmlNodeSetContent(dummy, BAD_CAST(model->u.element->def)); in model_to_zval_object()
1410 val = master_to_zval(model->u.element->encode, dummy); in model_to_zval_object()
1413 val = master_to_zval(model->u.element->encode, r_node); in model_to_zval_object()
1415 if ((node = get_node(node->next, model->u.element->name)) != NULL) { in model_to_zval_object()
1423 …if (model->u.element->fixed && strcmp(model->u.element->fixed, (char*)node->children->content) != … in model_to_zval_object()
1424 …ement '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.ele… in model_to_zval_object()
1426 val = master_to_zval(model->u.element->encode, node); in model_to_zval_object()
1427 } else if (model->u.element->fixed) { in model_to_zval_object()
1429 xmlNodeSetContent(dummy, BAD_CAST(model->u.element->fixed)); in model_to_zval_object()
1430 val = master_to_zval(model->u.element->encode, dummy); in model_to_zval_object()
1432 } else if (model->u.element->def && !model->u.element->nillable) { in model_to_zval_object()
1434 xmlNodeSetContent(dummy, BAD_CAST(model->u.element->def)); in model_to_zval_object()
1435 val = master_to_zval(model->u.element->encode, dummy); in model_to_zval_object()
1438 val = master_to_zval(model->u.element->encode, node); in model_to_zval_object()
1441 } while ((node = get_node(node->next, model->u.element->name)) != NULL); in model_to_zval_object()
1443 } else if ((Z_TYPE_P(val) != IS_NULL || !model->u.element->nillable) && in model_to_zval_object()
1445 (model->max_occurs == -1 || model->max_occurs > 1)) { in model_to_zval_object()
1453 set_zval_property(ret, model->u.element->name, val TSRMLS_CC); in model_to_zval_object()
1464 zend_hash_internal_pointer_reset_ex(model->u.content, &pos); in model_to_zval_object()
1465 while (zend_hash_get_current_data_ex(model->u.content, (void**)&tmp, &pos) == SUCCESS) { in model_to_zval_object()
1471 zend_hash_move_forward_ex(model->u.content, &pos); in model_to_zval_object()
1479 model_to_zval_object(ret, model->u.group->model, data, sdl TSRMLS_CC); in model_to_zval_object()
1595 if (sdlType->model) { in to_zval_object_ex()
1600 model_to_zval_object(ret, sdlType->model, data, sdl TSRMLS_CC); in to_zval_object_ex()
1707 static int model_to_xml_object(xmlNodePtr node, sdlContentModelPtr model, zval *object, int style, … in model_to_xml_object() argument
1709 switch (model->kind) { in model_to_xml_object()
1715 data = get_zval_property(object, model->u.element->name TSRMLS_CC); in model_to_xml_object()
1718 !model->u.element->nillable && in model_to_xml_object()
1719 model->min_occurs > 0 && in model_to_xml_object()
1724 enc = model->u.element->encode; in model_to_xml_object()
1725 if ((model->max_occurs == -1 || model->max_occurs > 1) && in model_to_xml_object()
1733 if (Z_TYPE_PP(val) == IS_NULL && model->u.element->nillable) { in model_to_xml_object()
1740 …model->u.element->fixed && strcmp(model->u.element->fixed, (char*)property->children->content) != … in model_to_xml_object()
1741 …ement '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.ele… in model_to_xml_object()
1744 xmlNodeSetName(property, BAD_CAST(model->u.element->name)); in model_to_xml_object()
1746 model->u.element->namens && in model_to_xml_object()
1747 model->u.element->form == XSD_FORM_QUALIFIED) { in model_to_xml_object()
1748 xmlNsPtr nsp = encode_add_ns(property, model->u.element->namens); in model_to_xml_object()
1754 if (Z_TYPE_P(data) == IS_NULL && model->u.element->nillable) { in model_to_xml_object()
1758 } else if (Z_TYPE_P(data) == IS_NULL && model->min_occurs == 0) { in model_to_xml_object()
1763 …model->u.element->fixed && strcmp(model->u.element->fixed, (char*)property->children->content) != … in model_to_xml_object()
1764 …ement '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.ele… in model_to_xml_object()
1767 xmlNodeSetName(property, BAD_CAST(model->u.element->name)); in model_to_xml_object()
1769 model->u.element->namens && in model_to_xml_object()
1770 model->u.element->form == XSD_FORM_QUALIFIED) { in model_to_xml_object()
1771 xmlNsPtr nsp = encode_add_ns(property, model->u.element->namens); in model_to_xml_object()
1776 } else if (strict && model->u.element->nillable && model->min_occurs > 0) { in model_to_xml_object()
1777 property = xmlNewNode(NULL, BAD_CAST(model->u.element->name)); in model_to_xml_object()
1781 model->u.element->namens && in model_to_xml_object()
1782 model->u.element->form == XSD_FORM_QUALIFIED) { in model_to_xml_object()
1783 xmlNsPtr nsp = encode_add_ns(property, model->u.element->namens); in model_to_xml_object()
1787 } else if (model->min_occurs == 0) { in model_to_xml_object()
1791 soap_error1(E_ERROR, "Encoding: object has no '%s' property", model->u.element->name); in model_to_xml_object()
1805 if ((model->max_occurs == -1 || model->max_occurs > 1) && in model_to_xml_object()
1820 } else if (model->min_occurs == 0) { in model_to_xml_object()
1835 zend_hash_internal_pointer_reset_ex(model->u.content, &pos); in model_to_xml_object()
1836 while (zend_hash_get_current_data_ex(model->u.content, (void**)&tmp, &pos) == SUCCESS) { in model_to_xml_object()
1843 zend_hash_move_forward_ex(model->u.content, &pos); in model_to_xml_object()
1852 zend_hash_internal_pointer_reset_ex(model->u.content, &pos); in model_to_xml_object()
1853 while (zend_hash_get_current_data_ex(model->u.content, (void**)&tmp, &pos) == SUCCESS) { in model_to_xml_object()
1860 zend_hash_move_forward_ex(model->u.content, &pos); in model_to_xml_object()
1865 …return model_to_xml_object(node, model->u.group->model, object, style, strict && model->min_occurs… in model_to_xml_object()
1873 static sdlTypePtr model_array_element(sdlContentModelPtr model) in model_array_element() argument
1875 switch (model->kind) { in model_array_element()
1877 if (model->max_occurs == -1 || model->max_occurs > 1) { in model_array_element()
1878 return model->u.element; in model_array_element()
1889 if (zend_hash_num_elements(model->u.content) != 1) { in model_array_element()
1892 zend_hash_internal_pointer_reset_ex(model->u.content, &pos); in model_array_element()
1893 zend_hash_get_current_data_ex(model->u.content, (void**)&tmp, &pos); in model_array_element()
1897 return model_array_element(model->u.group->model); in model_array_element()
1991 sdlType->model != NULL && in to_xml_object()
1992 (array_el = model_array_element(sdlType->model)) != NULL) { in to_xml_object()
2014 } else if (sdlType->model) { in to_xml_object()
2015 model_to_xml_object(xmlParam, sdlType->model, data, style, 1 TSRMLS_CC); in to_xml_object()