/** * Represents the "get_media_csv" action. * * @throws ShopgateLibraryException * @see http://wiki.shopgate.com/Shopgate_Plugin_API_get_media_csv */ protected function getMediaCsv() { 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 items csv file if requested $this->plugin->startGetMediaCsv(); if (empty($this->response)) { $this->response = new ShopgatePluginApiResponseTextCsvExport($this->trace_id); } $this->responseData = $this->config->getMediaCsvPath(); }
/** * Takes care of buffer and file handlers and calls ShopgatePlugin::createItemsCsv(). * * @throws ShopgateLibraryException */ public final function startGetMediaCsv() { $this->buffer->setFile($this->config->getMediaCsvPath()); $this->createMediaCsv(); $this->buffer->finish(); }