function services_client_connection_get in Services Client 7.2
Same name and namespace in other branches
- 7 services_client_connection/services_client_connection.module \services_client_connection_get()
Create new connection client
Parameters
$name:
2 calls to services_client_connection_get()
- EventHandler::getConnection in include/
event.inc - Retrieves event connection to remote site.
- services_client_wizard_form_details_validate in ./
services_client.admin.inc - Try to retrieve remote entities definition.
File
- services_client_connection/
services_client_connection.module, line 194 - Services Client Connection allows to configure different connections via UI and store them as exportable configuration. API client should be able to communicate with different versions of remote Services module via unified API client.
Code
function services_client_connection_get($name) {
$connection = services_client_connection_load($name);
if (!$connection) {
throw new Exception(t('Specified connection is not existing.'));
}
$client = new ServicesClientConnection($connection);
return $client;
}