Beispiel #1
0
 /**
  * @param $request
  * @return mixed
  * @throws \Exception
  */
 public function getCollectionRequest($request)
 {
     $this->resetResponse();
     $this->addShopRequestCount();
     $query = $this->db->query($request);
     if (!$query) {
         $errorInfo = $this->db->errorInfo();
         $this->error = "Not a valid collection request! : " . $errorInfo[2];
         return;
     }
     $response = $query->fetchAll();
     if ($response) {
         $this->response = $response;
     }
     return parent::getCollectionRequest($request);
 }
Beispiel #2
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);
 }