protected function setApiKey()
 {
     $this->apiKey = \SystemConfig::getInstance()->google['api_key'];
     if (!$this->apiKey) {
         throw new ProviderException("Google Maps API Key was not set");
     }
 }
 /**
  * TimeZoneDbFree constructor.
  */
 public function __construct()
 {
     $this->apiKey = \SystemConfig::getInstance()->timezone_db['api_key'];
     if (!$this->apiKey) {
         throw new ProviderException("API Key for Time Zone DB is not set");
     }
 }
 /**
  *
  *
  * @param \ClientHttpRequest $req
  */
 public function __construct($req)
 {
     $this->response = new Response();
     $req->addHook(new RequestLogger(), 1000);
     $this->currentVersion = doubleval(\SystemConfig::getInstance()->system['current_version']);
     $this->userVersion = doubleval($req->getQueryParam('version'));
     parent::__construct($req);
     $this->showtimeService = ShowtimeService::instance();
 }
 public static function getCustomUrl($tag, $secure = false)
 {
     return ($secure ? "https://" : "http://") . ($tag ? "{$tag}." : "") . SystemConfig::getInstance()->system['root_domain'] . "/";
 }
 public function isUsingPhysicalDistance()
 {
     return !!\SystemConfig::getInstance()->service['physical_distance'];
 }
 private function shouldDeferDistanceInfo()
 {
     return !!\SystemConfig::getInstance()->service['defer_distance_info'];
 }
 protected function _initTripicanApi()
 {
     $GLOBALS['config'] = isset($GLOBALS['config']) ? (array) $GLOBALS['config'] : [];
     $GLOBALS['config'] = array_merge($GLOBALS['config'], \SystemConfig::getInstance()->tripican);
     $GLOBALS['config']['use_ssl'] = 'tripican.com' == $GLOBALS['config']['api_host'];
 }
 protected function isLoggingRequests()
 {
     return !!\SystemConfig::getInstance()->service['log_requests'];
 }
 /**
  * Since most cinemas returned already have GEOcode infor
  * Simply tell system to compute distance using Haversine Greate Circle
  */
 private function overrideDistanceCompute()
 {
     \SystemConfig::getInstance()->overrideConfig('service', 'defer_distance_info', false)->overrideConfig('service', 'physical_distance', false);
 }