private function getProducts()
 {
     $okProductsDataProvider = new OkProductsDataProvider($this->productsCsvUrl, $this->intermediateCsvFile);
     return $okProductsDataProvider->getAll();
 }
Beispiel #2
0
 private function buildProductsUpdatesConnector($csvUrl)
 {
     $this->db = $this->getDbReadOnly();
     $this->okChannel = new OkChannel($this->iniParams->get("channelId"), $this->db);
     // General Concerns
     $localFeedPath = sprintf("%s/%s.xml", $this->getConnectorFilesDir(), $this->connectorRunId);
     $userLogger = $this->getUserLogger();
     // Data providers
     $intermediateCsvFile = sprintf("%s/%s.csv", $this->getProcessedFilesPath(), $this->connectorRunId);
     $okProductsDataProvider = new OkProductsDataProvider($csvUrl, $intermediateCsvFile);
     $xmlExporter = new ProductsUpdates($this->iniParams, $okProductsDataProvider->getAll(), $userLogger);
     // Exporter
     return new XmlToLocalConnector($localFeedPath, $xmlExporter, $userLogger);
 }