src/Shell/ImportShell.php
protected function processImportFile(Import $import) : void
    {
        $this->out('Processing import file ..');

        $path = ImportUtility::getProcessedFile($import);
        if (file_exists($path)) {
            return;
        }

        // create processed file
        $writer = Writer::createFromPath($path, 'w+');

        $reader = Reader::createFromPath($import->get('filename'), 'r');

        $results = $reader->fetch();
        foreach ($results as $row) {
            if (empty(array_filter($row))) {
                continue;
            }

            $writer->insertOne($row);
        }
    }
protected function processImportFile(Import $import) : void
    {
        $this->out('Processing import file ..');

        $path = ImportUtility::getProcessedFile($import);
        if (file_exists($path)) {
            return;
        }

        // create processed file
        $writer = Writer::createFromPath($path, 'w+');

        $reader = Reader::createFromPath($import->get('filename'), 'r');

        $results = $reader->fetch();
        foreach ($results as $row) {
            if (empty(array_filter($row))) {
                continue;
            }

            $writer->insertOne($row);
        }
    }
protected function processImportFile ( Import $ import ) : void { $ this -> out ( 'Processing import file ..' ) ; $ path = ImportUtility :: getProcessedFile ( $ import ) ; if ( file_exists ( $ path ) ) { return ; } // create processed file $ writer = Writer :: createFromPath ( $ path , 'w+' ) ; $ reader = Reader :: createFromPath ( $ import -> get ( 'filename' ) , 'r' ) ; $ results = $ reader -> fetch ( ) ; foreach ( $ results as $ row ) { if ( empty ( array_filter ( $ row ) ) ) { continue ; } $ writer -> insertOne ( $ row ) ; } }
Process import file.

@param \CsvMigrations\Model\Entity\Import $import Import entity
@return void
Process import file .