Example #1
0
 /**
  * @param $request
  * @return mixed
  */
 public function getCollectionRequest($request)
 {
     $this->resetResponse();
     $this->addGaRequestCount();
     $response = $this->analyticsService->getRequest($request);
     if ($this->analyticsService->getError()) {
         $this->error = $this->analyticsService->getError();
         return;
     }
     if (!$response) {
         $this->error = 'Missing GA response!';
         return;
     }
     $this->response = $response;
     return parent::getCollectionRequest($request);
 }
Example #2
0
 /**
  * @param $request
  * @return mixed|void
  */
 public function getPackageRequest($request)
 {
     $this->resetResponse();
     $this->addShopRequestCount();
     $query = $this->db->query($request);
     if (!$query) {
         $errorInfo = $this->db->errorInfo();
         $this->error = "Not a valid item package request! : " . $errorInfo[2];
         return;
     }
     $response = $query->fetchAll();
     if ($response) {
         $this->response = $response;
     }
     return parent::getPackageRequest($request);
 }
Example #3
0
 protected function initClientAdapter()
 {
     $this->clientAdapter = $this->componentFactory->getClientAdapter();
     $this->clientAdapter->setSettingService($this->settingService);
     $this->clientAdapter->setImportLog($this->importLog);
 }