<?php

namespace Pasticcinformatici\ReadCSV\Model;

use Magento\Cron\Exception;
use Magento\Framework\Model\AbstractModel;
use Symfony\Component\Console\Output\OutputInterface;

class ReadCSV extends AbstractModel {

    public function sayHi($csvFile, $output) {
        $output->writeln('<info>Reading Category...</info>');
        $file_handle = fopen($csvFile, 'r');
        while (!feof($file_handle)) {
            $line_of_text[] = fgetcsv($file_handle, 1024);
        }
        fclose($file_handle);
        unset($line_of_text[0]);
        return $line_of_text;
    }

}
