You are here

function services_client_get_connection_id in Services Client 7

Same name and namespace in other branches
  1. 7.2 services_client.module \services_client_get_connection_id()

Load remote services client id for connection

1 call to services_client_get_connection_id()
services_client_services_client_connection_load in ./services_client.module
Implements hook_services_client_connection_load().

File

./services_client.module, line 1260
Services client module allows to push different types of objects on different types of events such as node_save, user_save to remote masters.

Code

function services_client_get_connection_id($name) {
  $cache =& drupal_static(__FUNCTION__);
  if (!isset($cache[$name])) {
    $sql = "SELECT services_client_id FROM {services_client_connection_id} WHERE name = :name";
    $cache[$name] = db_query($sql, array(
      ':name' => $name,
    ))
      ->fetchField();
  }
  return isset($cache[$name]) ? $cache[$name] : NULL;
}