56 $this->_lineLength = $length;
68 $this->_delimiter = $delimiter;
80 $this->_enclosure = $enclosure;
94 if (!file_exists(
$file)) {
95 throw new \Exception(
'File "' .
$file .
'" does not exist');
99 while ($rowData = fgetcsv($fh, $this->_lineLength, $this->_delimiter, $this->_enclosure)) {
118 foreach ($csvData as $rowData) {
119 if (isset($rowData[$keyIndex])) {
120 $data[$rowData[$keyIndex]] = isset($rowData[$valueIndex]) ? $rowData[$valueIndex] :
null;
155 foreach (
$data as $dataRow) {
156 $this->file->filePutCsv($fileHandler, $dataRow, $this->_delimiter, $this->_enclosure);
158 fclose($fileHandler);
if($exist=($block->getProductCollection() && $block->getProductCollection() ->getSize())) $mode
getDataPairs($file, $keyIndex=0, $valueIndex=1)
appendData($file, $data, $mode='w')