Lines Matching refs:model

1375 static void model_to_zval_object(zval *ret, sdlContentModelPtr model, xmlNodePtr data, sdlPtr sdl T…  in model_to_zval_object()  argument
1377 switch (model->kind) { in model_to_zval_object()
1379 if (model->u.element->name) { in model_to_zval_object()
1380 xmlNodePtr node = get_node(data->children, model->u.element->name); in model_to_zval_object()
1388 …if (model->u.element->fixed && strcmp(model->u.element->fixed, (char*)r_node->children->content) !… in model_to_zval_object()
1389 …ement '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.ele… in model_to_zval_object()
1391 val = master_to_zval(model->u.element->encode, r_node TSRMLS_CC); in model_to_zval_object()
1392 } else if (model->u.element->fixed) { in model_to_zval_object()
1394 xmlNodeSetContent(dummy, BAD_CAST(model->u.element->fixed)); in model_to_zval_object()
1395 val = master_to_zval(model->u.element->encode, dummy TSRMLS_CC); in model_to_zval_object()
1397 } else if (model->u.element->def && !model->u.element->nillable) { in model_to_zval_object()
1399 xmlNodeSetContent(dummy, BAD_CAST(model->u.element->def)); in model_to_zval_object()
1400 val = master_to_zval(model->u.element->encode, dummy TSRMLS_CC); in model_to_zval_object()
1403 val = master_to_zval(model->u.element->encode, r_node TSRMLS_CC); in model_to_zval_object()
1405 if ((node = get_node(node->next, model->u.element->name)) != NULL) { in model_to_zval_object()
1413 …if (model->u.element->fixed && strcmp(model->u.element->fixed, (char*)node->children->content) != … in model_to_zval_object()
1414 …ement '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.ele… in model_to_zval_object()
1416 val = master_to_zval(model->u.element->encode, node TSRMLS_CC); in model_to_zval_object()
1417 } else if (model->u.element->fixed) { in model_to_zval_object()
1419 xmlNodeSetContent(dummy, BAD_CAST(model->u.element->fixed)); in model_to_zval_object()
1420 val = master_to_zval(model->u.element->encode, dummy TSRMLS_CC); in model_to_zval_object()
1422 } else if (model->u.element->def && !model->u.element->nillable) { in model_to_zval_object()
1424 xmlNodeSetContent(dummy, BAD_CAST(model->u.element->def)); in model_to_zval_object()
1425 val = master_to_zval(model->u.element->encode, dummy TSRMLS_CC); in model_to_zval_object()
1428 val = master_to_zval(model->u.element->encode, node TSRMLS_CC); in model_to_zval_object()
1431 } while ((node = get_node(node->next, model->u.element->name)) != NULL); in model_to_zval_object()
1433 } else if ((Z_TYPE_P(val) != IS_NULL || !model->u.element->nillable) && in model_to_zval_object()
1435 (model->max_occurs == -1 || model->max_occurs > 1)) { in model_to_zval_object()
1443 set_zval_property(ret, model->u.element->name, val TSRMLS_CC); in model_to_zval_object()
1454 zend_hash_internal_pointer_reset_ex(model->u.content, &pos); in model_to_zval_object()
1455 while (zend_hash_get_current_data_ex(model->u.content, (void**)&tmp, &pos) == SUCCESS) { in model_to_zval_object()
1461 zend_hash_move_forward_ex(model->u.content, &pos); in model_to_zval_object()
1469 model_to_zval_object(ret, model->u.group->model, data, sdl TSRMLS_CC); in model_to_zval_object()
1584 if (sdlType->model) { in to_zval_object_ex()
1589 model_to_zval_object(ret, sdlType->model, data, sdl TSRMLS_CC); in to_zval_object_ex()
1696 static int model_to_xml_object(xmlNodePtr node, sdlContentModelPtr model, zval *object, int style, … in model_to_xml_object() argument
1698 switch (model->kind) { in model_to_xml_object()
1704 data = get_zval_property(object, model->u.element->name TSRMLS_CC); in model_to_xml_object()
1707 !model->u.element->nillable && in model_to_xml_object()
1708 model->min_occurs > 0 && in model_to_xml_object()
1713 enc = model->u.element->encode; in model_to_xml_object()
1714 if ((model->max_occurs == -1 || model->max_occurs > 1) && in model_to_xml_object()
1722 if (Z_TYPE_PP(val) == IS_NULL && model->u.element->nillable) { in model_to_xml_object()
1729model->u.element->fixed && strcmp(model->u.element->fixed, (char*)property->children->content) != … in model_to_xml_object()
1730 …ement '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.ele… in model_to_xml_object()
1733 xmlNodeSetName(property, BAD_CAST(model->u.element->name)); in model_to_xml_object()
1735 model->u.element->namens && in model_to_xml_object()
1736 model->u.element->form == XSD_FORM_QUALIFIED) { in model_to_xml_object()
1737 xmlNsPtr nsp = encode_add_ns(property, model->u.element->namens); in model_to_xml_object()
1743 if (Z_TYPE_P(data) == IS_NULL && model->u.element->nillable) { in model_to_xml_object()
1747 } else if (Z_TYPE_P(data) == IS_NULL && model->min_occurs == 0) { in model_to_xml_object()
1752model->u.element->fixed && strcmp(model->u.element->fixed, (char*)property->children->content) != … in model_to_xml_object()
1753 …ement '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.ele… in model_to_xml_object()
1756 xmlNodeSetName(property, BAD_CAST(model->u.element->name)); in model_to_xml_object()
1758 model->u.element->namens && in model_to_xml_object()
1759 model->u.element->form == XSD_FORM_QUALIFIED) { in model_to_xml_object()
1760 xmlNsPtr nsp = encode_add_ns(property, model->u.element->namens); in model_to_xml_object()
1765 } else if (strict && model->u.element->nillable && model->min_occurs > 0) { in model_to_xml_object()
1766 property = xmlNewNode(NULL, BAD_CAST(model->u.element->name)); in model_to_xml_object()
1770 model->u.element->namens && in model_to_xml_object()
1771 model->u.element->form == XSD_FORM_QUALIFIED) { in model_to_xml_object()
1772 xmlNsPtr nsp = encode_add_ns(property, model->u.element->namens); in model_to_xml_object()
1776 } else if (model->min_occurs == 0) { in model_to_xml_object()
1780 soap_error1(E_ERROR, "Encoding: object has no '%s' property", model->u.element->name); in model_to_xml_object()
1794 if ((model->max_occurs == -1 || model->max_occurs > 1) && in model_to_xml_object()
1809 } else if (model->min_occurs == 0) { in model_to_xml_object()
1824 zend_hash_internal_pointer_reset_ex(model->u.content, &pos); in model_to_xml_object()
1825 while (zend_hash_get_current_data_ex(model->u.content, (void**)&tmp, &pos) == SUCCESS) { in model_to_xml_object()
1832 zend_hash_move_forward_ex(model->u.content, &pos); in model_to_xml_object()
1841 zend_hash_internal_pointer_reset_ex(model->u.content, &pos); in model_to_xml_object()
1842 while (zend_hash_get_current_data_ex(model->u.content, (void**)&tmp, &pos) == SUCCESS) { in model_to_xml_object()
1849 zend_hash_move_forward_ex(model->u.content, &pos); in model_to_xml_object()
1854 …return model_to_xml_object(node, model->u.group->model, object, style, strict && model->min_occurs… in model_to_xml_object()
1862 static sdlTypePtr model_array_element(sdlContentModelPtr model) in model_array_element() argument
1864 switch (model->kind) { in model_array_element()
1866 if (model->max_occurs == -1 || model->max_occurs > 1) { in model_array_element()
1867 return model->u.element; in model_array_element()
1878 if (zend_hash_num_elements(model->u.content) != 1) { in model_array_element()
1881 zend_hash_internal_pointer_reset_ex(model->u.content, &pos); in model_array_element()
1882 zend_hash_get_current_data_ex(model->u.content, (void**)&tmp, &pos); in model_array_element()
1886 return model_array_element(model->u.group->model); in model_array_element()
1979 sdlType->model != NULL && in to_xml_object()
1980 (array_el = model_array_element(sdlType->model)) != NULL) { in to_xml_object()
2002 } else if (sdlType->model) { in to_xml_object()
2003 model_to_xml_object(xmlParam, sdlType->model, data, style, 1 TSRMLS_CC); in to_xml_object()