Blame view

common/components/parsers/CustomCsvParser.php 858 Bytes
40ff24a1   Mihail   refactor CsvParse...
1
2
3
4
5
6
7
8
  <?php
  /**
   * Created by PhpStorm.
   * User: Cibermag
   * Date: 04.09.2015
   * Time: 16:07
   */
  
bedb55fe   Mihail   fixed Image class
9
  namespace common\components\parsers;
40ff24a1   Mihail   refactor CsvParse...
10
11
  
  
93e39994   Mihail   fixed parser and ...
12
  use common\components\CustomVarDamp;
f7ab7644   Mihail   after merge with ...
13
  
34d480b7   Mihail   temp commit - wor...
14
  use yii\base\ErrorException;
93e39994   Mihail   fixed parser and ...
15
  
98533894   Mihail   merge with server
16
  
036717a1   Mihail   add error excepti...
17
  class CustomCsvParser extends  \yii\multiparser\CsvParser {
40ff24a1   Mihail   refactor CsvParse...
18
  
ffd4b834   Mihail   add articul filte...
19
      public $last_line = 100;
474f35bf   Mihail   add DynamicFormHe...
20
21
      //public $hasHeaderRow = true;
     // public $keys = ['first','second', 'third', 'forth', 'fifth'];
6215a30d   Mihail   add converter int...
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  //    public function setupConverter()
  //    {
  //        if (!count($this->converter_conf)) {
  //            if ($this->hasHeaderRow) {
  //                // если у файла есть заголовок, то в результате имеем ассоциативный массив
  //                $this->converter_conf['hasKey'] = 1;
  //
  //            }
  //
  //        }
  ////        $this->converter = \Yii::createObject( $this->converter_conf );
  //    }
  
  
74072a2a   Mihail   add first version...
36
  
40ff24a1   Mihail   refactor CsvParse...
37
  }