You are here

function _wsclient_ui_unmap_type in Web service client 7

Maps the global name of a data type back to the local name in the service, if the type actually stems from the service.

2 calls to _wsclient_ui_unmap_type()
wsclient_ui_operation_submit in wsclient_ui/wsclient_ui.inc
Submit callback of operation form.
wsclient_ui_type_submit in wsclient_ui/wsclient_ui.inc
Submit callback of data type form.

File

wsclient_ui/wsclient_ui.inc, line 1409
WSClient UI - implements service description management and configuration screens.

Code

function _wsclient_ui_unmap_type($type, $service) {
  if (strpos($type, 'wsclient_' . $service->name . '_') === 0) {
    $unmaped_type = substr($type, strlen('wsclient_' . $service->name . '_'));
    if (array_key_exists($unmaped_type, $service
      ->dataTypes())) {
      return $unmaped_type;
    }
  }
  return $type;
}