You are here

public function Lockr::createPantheonClient in Lockr 7.3

File

vendor/lockr/lockr/src/Lockr.php, line 84

Class

Lockr

Namespace

Lockr

Code

public function createPantheonClient($client_token) {
  $query = <<<'EOQ'
mutation CreatePantheonClient($input: CreatePantheonClient!) {
  createPantheonClient(input: $input) {
    id
  }
}
EOQ;
  $t0 = microtime(true);
  $this->client
    ->query([
    'query' => $query,
    'variables' => [
      'input' => [
        'token' => $client_token,
      ],
    ],
  ]);
  $t1 = microtime(true);
  $this->client
    ->getStats()
    ->lockrCallCompleted('create_pantheon_client', $t1 - $t0);
}