/** * @param $domainUrl * @param $appkey * @param $masterSecret * @throws \InvalidArgumentException * @throws \UnexpectedValueException */ public function __construct($domainUrl, $appkey, $masterSecret) { $this->appkey = $appkey; $this->masterSecret = $masterSecret; $this->domainUrlList = array($domainUrl); if ((string) $domainUrl === '') { $this->domainUrlList = GTConfig::getDefaultDomainUrl(); } $this->initOSDomain(null); }
public function __construct($domainUrl, $appkey, $masterSecret) { $this->appkey = $appkey; $this->masterSecret = $masterSecret; if ($domainUrl == NULL || strlen($domainUrl) == 0) { $this->domainUrlList = GTConfig::getDefaultDomainUrl(); } else { $this->domainUrlList = array($domainUrl); } $this->initOSDomain(null); }
public function __construct($domainUrl, $appkey, $masterSecret, $ssl = NULL) { $this->appkey = $appkey; $this->masterSecret = $masterSecret; $domainUrl = trim($domainUrl); if ($ssl == NULL && $domainUrl != NULL && strpos(strtolower($domainUrl), "https:") === 0) { $ssl = true; } $this->useSSL = $ssl == NULL ? false : $ssl; if ($domainUrl == NULL || strlen($domainUrl) == 0) { $this->domainUrlList = GTConfig::getDefaultDomainUrl($this->useSSL); } else { $this->domainUrlList = array($domainUrl); } $this->initOSDomain(null); }