function drush_wsdata_set_endpoint in Web Service Data 7
Drush command callback.
File
- ./
wsdata.drush.inc, line 95 - Drush implementation for the wsconfig module.
Code
function drush_wsdata_set_endpoint() {
$args = func_get_args();
$type = $args[0];
$endpoint = $args[1];
if (empty($type) or empty($endpoint)) {
return drush_set_error('arguments_invalid', dt('Please specify WSConfig Type and an endpoint. See drush help wsdata-set-endpoint'));
}
$wsconfigtype = wsconfig_type_load($type);
if ($wsconfigtype) {
$wsconfigtype
->setEndpoint($endpoint);
wsconfig_type_save($wsconfigtype);
}
else {
return drush_set_error('arguments_invalid', dt('WSConfig type !type was not found. Run "drush wsdata-list-types" for a list of available types.', array(
'!type' => $type,
)));
}
}