You are here

public function KeyProvider::getKeys in Akamai 8.3

Retrieves all keys from the key module.

Return value

array An array of valid keys.

Throws

\Exception Indicates the key.repository service was not found.

Overrides KeyProviderInterface::getKeys

File

src/KeyProvider.php, line 52

Class

KeyProvider
Wrapper around the optional key.provider service.

Namespace

Drupal\akamai

Code

public function getKeys() {
  if (!$this
    ->hasKeyRepository()) {
    throw new \Exception('Missing key.repository service. Ensure key module is enabled.');
  }
  return $this->keyRepository
    ->getKeys();
}