You are here

public static function Lockr::create in Lockr 7.2

Same name and namespace in other branches
  1. 7 src/Lockr/Lockr.php \Lockr\Lockr::create()

Get the partner instance.

Return value

static The partner instance.

3 calls to Lockr::create()
Lockr::key in vendor/lockr/lockr-client/src/Lockr.php
Returns the client for key operations.
Lockr::site in vendor/lockr/lockr-client/src/Lockr.php
Returns the client for site operations.
lockr_client in ./lockr.module
Returns the Lockr client for this site.

File

vendor/lockr/lockr-client/src/Lockr.php, line 65

Class

Lockr
Primary interface for Lockr API calls.

Namespace

Lockr

Code

public static function create(PartnerInterface $partner = null) {
  if (null == static::$instance) {
    if ($partner !== null) {
      static::$instance = new static($partner);
    }
    else {
      static::$instance = new static(new Partner());
    }
  }
  return static::$instance;
}