function clients_connection_load in Web Service Clients 6
Same name and namespace in other branches
- 6.2 clients.module \clients_connection_load()
- 7.3 clients.module \clients_connection_load()
- 7 clients.module \clients_connection_load()
- 7.2 clients.module \clients_connection_load()
21 calls to clients_connection_load()
- clients_call in ./
clients.module - defines hook_clients_call
- clients_connections in ./
clients.module - clients_connection_view in ./
clients.module - clients_delete_form in ./
clients.module - clients_drupal_add_validate in backends/
clients_drupal/ clients_drupal.module - Implementation of hook_validate()
File
- ./
clients.module, line 568 - Clients module - handles keys and service connections and provides an API for clients @author Django Beatty - adub
Code
function clients_connection_load($connectionIdentifier) {
if (is_int($connectionIdentifier)) {
$result = db_query("SELECT * FROM {clients_connections} WHERE {clients_connections}.cid = %d", $connectionIdentifier);
}
elseif (is_string($connectionIdentifier)) {
$result = db_query("SELECT * FROM {clients_connections} WHERE {clients_connections}.name = '%s'", $connectionIdentifier);
}
else {
// @todo watchdog
drupal_set_message('error');
return;
// or FALSE?
}
$connection = db_fetch_object($result);
$connection->configuration = unserialize($connection->configuration);
// invoke hook for contrib modules to process configuration
module_invoke_all('clients_connection_load', $connection);
return $connection;
}