You are here

public function SiteClient::exists in Lockr 7.2

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

Checks if the current site/env is registered and/or available.

Return value

bool[]

Throws

ServerException if the server is unavailable or returns an error.

ClientException if there was an unexpected client error.

File

vendor/lockr/lockr-client/src/SiteClient.php, line 67

Class

SiteClient
API for site management operations.

Namespace

Lockr

Code

public function exists() {
  $body = $this->client
    ->get('/v1/site/exists');
  $defaults = array(
    'cert_valid' => false,
    'exists' => false,
    'available' => false,
    'has_cc' => false,
  );
  if (is_array($body)) {
    return $body + $defaults;
  }
  return $defaults;
}