Example #1
0
 public function __construct($owner)
 {
     # Saving our properies
     $this->owner = $owner;
     $this->host = defined('NQ_API_HOST_FILE') ? NQ_API_HOST_FILE : 'http://file' . self::url_version . '.nuquery.com';
     # Adding our available defines
     $owner->add_available_define(self::nq_namespace, 'NQ_API_HOST_FILE');
     # Initializing the parent
     parent::__construct($owner, $this->host);
 }
Example #2
0
 public function __construct($owner)
 {
     # Saving our properies
     $this->owner = $owner;
     $this->host = defined('NQ_API_HOST_IMAGE') ? NQ_API_HOST_IMAGE : 'http://img' . self::url_version . '.nuquery.com';
     # Adding our available defines
     $owner->add_available_define(self::nq_namespace, 'NQ_API_HOST_IMAGE');
     # Making sure we have a curl object
     $this->curl = isset($owner->api_curl) ? $owner->api_curl : false;
     if ($this->curl === false) {
         throw new Exception('nuQuery_API_Auth requires nuQuery_API_CURL to be enabled.  Please install the file in the ../nq-lib/ folder.');
         return;
     }
     # Initializing the parent
     parent::__construct($owner, $this->host);
 }