/** * Get API key (with prefix if set) * @param string $apiKey name of apikey * @return string API key with the prefix */ public function getApiKeyWithPrefix($apiKey) { $prefix = $this->config->getApiKeyPrefix($apiKey); $apiKey = $this->config->getApiKey($apiKey); if (!isset($apiKey)) { return null; } if (isset($prefix)) { $keyWithPrefix = $prefix . " " . $apiKey; } else { $keyWithPrefix = $apiKey; } return $keyWithPrefix; }