You are here

protected function ZoomApiClient::getKeyValue in Zoom API 8

Same name and namespace in other branches
  1. 2.0.x src/Client/ZoomApiClient.php \Drupal\zoomapi\Client\ZoomApiClient::getKeyValue()

Return a KeyValue.

Parameters

string $whichConfig: Name of the config in which the key name is stored.

Return value

mixed Null or string.

1 call to ZoomApiClient::getKeyValue()
ZoomApiClient::__construct in src/Client/ZoomApiClient.php
Constructor.

File

src/Client/ZoomApiClient.php, line 213

Class

ZoomApiClient
Uses http client to interact with the Zoom API.

Namespace

Drupal\zoomapi\Client

Code

protected function getKeyValue($whichConfig) {
  if (empty($this->config
    ->get($whichConfig))) {
    return NULL;
  }
  $whichKey = $this->config
    ->get($whichConfig);
  $keyValue = $this->keyRepository
    ->getKey($whichKey)
    ->getKeyValue();
  if (empty($keyValue)) {
    return NULL;
  }
  return $keyValue;
}