CustomCsvParser.php 858 Bytes
<?php
/**
 * Created by PhpStorm.
 * User: Cibermag
 * Date: 04.09.2015
 * Time: 16:07
 */

namespace common\components\parsers;


use common\components\CustomVarDamp;

use yii\base\ErrorException;


class CustomCsvParser extends  \yii\multiparser\CsvParser {

    public $last_line = 100;
    //public $hasHeaderRow = true;
   // public $keys = ['first','second', 'third', 'forth', 'fifth'];
//    public function setupConverter()
//    {
//        if (!count($this->converter_conf)) {
//            if ($this->hasHeaderRow) {
//                // если у файла есть заголовок, то в результате имеем ассоциативный массив
//                $this->converter_conf['hasKey'] = 1;
//
//            }
//
//        }
////        $this->converter = \Yii::createObject( $this->converter_conf );
//    }



}