public function setApiKey($apiKey) { if (!empty($apiKey) && strlen($apiKey) < 32) { throw new \Exception("API-Key has to be at least 32 characters long"); } $this->apiKey = $apiKey; }