Lines Matching refs:model

1325 static void model_to_zval_object(zval *ret, sdlContentModelPtr model, xmlNodePtr data, sdlPtr sdl)  in model_to_zval_object()  argument
1327 switch (model->kind) { in model_to_zval_object()
1329 if (model->u.element->name) { in model_to_zval_object()
1330 xmlNodePtr node = get_node(data->children, model->u.element->name); in model_to_zval_object()
1339 …if (model->u.element->fixed && strcmp(model->u.element->fixed, (char*)r_node->children->content) !… in model_to_zval_object()
1340 …ement '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.ele… in model_to_zval_object()
1342 master_to_zval(&val, model->u.element->encode, r_node); in model_to_zval_object()
1343 } else if (model->u.element->fixed) { in model_to_zval_object()
1345 xmlNodeSetContent(dummy, BAD_CAST(model->u.element->fixed)); in model_to_zval_object()
1346 master_to_zval(&val, model->u.element->encode, dummy); in model_to_zval_object()
1348 } else if (model->u.element->def && !model->u.element->nillable) { in model_to_zval_object()
1350 xmlNodeSetContent(dummy, BAD_CAST(model->u.element->def)); in model_to_zval_object()
1351 master_to_zval(&val, model->u.element->encode, dummy); in model_to_zval_object()
1354 master_to_zval(&val, model->u.element->encode, r_node); in model_to_zval_object()
1356 if ((node = get_node(node->next, model->u.element->name)) != NULL) { in model_to_zval_object()
1363 …if (model->u.element->fixed && strcmp(model->u.element->fixed, (char*)node->children->content) != … in model_to_zval_object()
1364 …ement '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.ele… in model_to_zval_object()
1366 master_to_zval(&val, model->u.element->encode, node); in model_to_zval_object()
1367 } else if (model->u.element->fixed) { in model_to_zval_object()
1369 xmlNodeSetContent(dummy, BAD_CAST(model->u.element->fixed)); in model_to_zval_object()
1370 master_to_zval(&val, model->u.element->encode, dummy); in model_to_zval_object()
1372 } else if (model->u.element->def && !model->u.element->nillable) { in model_to_zval_object()
1374 xmlNodeSetContent(dummy, BAD_CAST(model->u.element->def)); in model_to_zval_object()
1375 master_to_zval(&val, model->u.element->encode, dummy); in model_to_zval_object()
1378 master_to_zval(&val, model->u.element->encode, node); in model_to_zval_object()
1381 } while ((node = get_node(node->next, model->u.element->name)) != NULL); in model_to_zval_object()
1383 } else if ((Z_TYPE(val) != IS_NULL || !model->u.element->nillable) && in model_to_zval_object()
1385 (model->max_occurs == -1 || model->max_occurs > 1)) { in model_to_zval_object()
1392 set_zval_property(ret, model->u.element->name, &val); in model_to_zval_object()
1402 ZEND_HASH_FOREACH_PTR(model->u.content, tmp) { in model_to_zval_object()
1415 model_to_zval_object(ret, model->u.group->model, data, sdl); in model_to_zval_object()
1532 if (sdlType->model) { in to_zval_object_ex()
1533 model_to_zval_object(ret, sdlType->model, data, sdl); in to_zval_object_ex()
1632 static int model_to_xml_object(xmlNodePtr node, sdlContentModelPtr model, zval *object, int style, … in model_to_xml_object() argument
1634 switch (model->kind) { in model_to_xml_object()
1641 data = get_zval_property(object, model->u.element->name, &rv); in model_to_xml_object()
1644 !model->u.element->nillable && in model_to_xml_object()
1645 model->min_occurs > 0 && in model_to_xml_object()
1650 enc = model->u.element->encode; in model_to_xml_object()
1651 if ((model->max_occurs == -1 || model->max_occurs > 1) && in model_to_xml_object()
1659 if (Z_TYPE_P(val) == IS_NULL && model->u.element->nillable) { in model_to_xml_object()
1666model->u.element->fixed && strcmp(model->u.element->fixed, (char*)property->children->content) != … in model_to_xml_object()
1667 …ement '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.ele… in model_to_xml_object()
1670 xmlNodeSetName(property, BAD_CAST(model->u.element->name)); in model_to_xml_object()
1672 model->u.element->namens && in model_to_xml_object()
1673 model->u.element->form == XSD_FORM_QUALIFIED) { in model_to_xml_object()
1674 xmlNsPtr nsp = encode_add_ns(property, model->u.element->namens); in model_to_xml_object()
1679 if (Z_TYPE_P(data) == IS_NULL && model->u.element->nillable) { in model_to_xml_object()
1683 } else if (Z_TYPE_P(data) == IS_NULL && model->min_occurs == 0) { in model_to_xml_object()
1688model->u.element->fixed && strcmp(model->u.element->fixed, (char*)property->children->content) != … in model_to_xml_object()
1689 …ement '%s' has fixed value '%s' (value '%s' is not allowed)", model->u.element->name, model->u.ele… in model_to_xml_object()
1692 xmlNodeSetName(property, BAD_CAST(model->u.element->name)); in model_to_xml_object()
1694 model->u.element->namens && in model_to_xml_object()
1695 model->u.element->form == XSD_FORM_QUALIFIED) { in model_to_xml_object()
1696 xmlNsPtr nsp = encode_add_ns(property, model->u.element->namens); in model_to_xml_object()
1701 } else if (strict && model->u.element->nillable && model->min_occurs > 0) { in model_to_xml_object()
1702 property = xmlNewNode(NULL, BAD_CAST(model->u.element->name)); in model_to_xml_object()
1706 model->u.element->namens && in model_to_xml_object()
1707 model->u.element->form == XSD_FORM_QUALIFIED) { in model_to_xml_object()
1708 xmlNsPtr nsp = encode_add_ns(property, model->u.element->namens); in model_to_xml_object()
1712 } else if (model->min_occurs == 0) { in model_to_xml_object()
1716 soap_error1(E_ERROR, "Encoding: object has no '%s' property", model->u.element->name); in model_to_xml_object()
1730 if ((model->max_occurs == -1 || model->max_occurs > 1) && in model_to_xml_object()
1743 } else if (model->min_occurs == 0) { in model_to_xml_object()
1757 ZEND_HASH_FOREACH_PTR(model->u.content, tmp) { in model_to_xml_object()
1771 ZEND_HASH_FOREACH_PTR(model->u.content, tmp) { in model_to_xml_object()
1782 …return model_to_xml_object(node, model->u.group->model, object, style, strict && model->min_occurs… in model_to_xml_object()
1790 static sdlTypePtr model_array_element(sdlContentModelPtr model) in model_array_element() argument
1792 switch (model->kind) { in model_array_element()
1794 if (model->max_occurs == -1 || model->max_occurs > 1) { in model_array_element()
1795 return model->u.element; in model_array_element()
1805 if (zend_hash_num_elements(model->u.content) != 1) { in model_array_element()
1808 ZEND_HASH_FOREACH_PTR(model->u.content, tmp) { in model_array_element()
1813 return model_array_element(model->u.group->model); in model_array_element()
1907 sdlType->model != NULL && in to_xml_object()
1908 (array_el = model_array_element(sdlType->model)) != NULL) { in to_xml_object()
1929 } else if (sdlType->model) { in to_xml_object()
1930 model_to_xml_object(xmlParam, sdlType->model, data, style, 1); in to_xml_object()