Exemplo n.º 1
0
 public function client()
 {
     if ($this->client == null) {
         $apiKey = $this->configManager->get(self::API_KEY_SETTING);
         if (!$apiKey) {
             throw new \Exception('No MailChimp api key found, please enter your api key in admin › configuration');
         }
         $this->client = new MailChimp($apiKey);
     }
     return $this->client;
 }