示例#1
0
文件: apis.php 项目: buttasg/cowgirlk
 /**
  * Represents the "get_reviews_csv" action.
  *
  * @throws ShopgateLibraryException
  * @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_reviews_csv
  */
 protected function getReviewsCsv()
 {
     if (isset($this->params['limit']) && isset($this->params['offset'])) {
         $this->plugin->setExportLimit((int) $this->params['limit']);
         $this->plugin->setExportOffset((int) $this->params['offset']);
         $this->plugin->setSplittedExport(true);
     }
     // generate / update reviews csv file
     $this->plugin->startGetReviewsCsv();
     if (empty($this->response)) {
         $this->response = new ShopgatePluginApiResponseTextCsvExport($this->trace_id);
     }
     $this->responseData = $this->config->getReviewsCsvPath();
 }