Example #1
0
 /**
  * TimeZoneDB Constructor.
  *
  * @param string         $apiKey
  * @param bool           $premium
  * @param HttpClient     $client
  * @param MessageFactory $messageFactory
  */
 public function __construct($apiKey, $premium = false, HttpClient $client = null, MessageFactory $messageFactory = null)
 {
     parent::__construct($client, $messageFactory);
     $this->apiKey = $apiKey;
     $this->host = (bool) $premium ? static::VIP_ENDPOINT : static::ENDPOINT;
 }
Example #2
0
 /**
  * Google constructor.
  *
  * @param string         $apiKey
  * @param HttpClient     $client
  * @param MessageFactory $messageFactory
  */
 public function __construct($apiKey = null, HttpClient $client = null, MessageFactory $messageFactory = null)
 {
     $this->apiKey = $apiKey;
     parent::__construct($client, $messageFactory);
 }