You are here

function lockr_client in Lockr 7.3

Same name and namespace in other branches
  1. 7 lockr.module \lockr_client()
  2. 7.2 lockr.module \lockr_client()

Returns the Lockr client for this site.

9 calls to lockr_client()
drush_lockr_register in ./lockr.drush.inc
Registers the site with lockr.
key_provider_lockr_build_configuration_form in plugins/key_provider/lockr.inc
The settings form.
key_type_lockr_encryption_generate_key_value in plugins/key_type/lockr_encryption.inc
Generate a key value.
lockr_admin_migrate_form_submit in ./lockr.admin.inc
lockr_admin_page in ./lockr.admin.inc

... See full list

File

./lockr.module, line 80
Hook implementations and callbacks for lockr.

Code

function lockr_client() {
  $lockr =& drupal_static(__FUNCTION__);
  if (!$lockr) {
    $settings = lockr_settings();
    $client = LockrClient::createFromSettings($settings);
    $secret_info = lockr_secret_info();
    $accounts_host = variable_get('lockr_accounts_host', 'accounts.lockr.io');
    $lockr = new Lockr($client, $secret_info, $accounts_host);
  }
  return $lockr;
}