Blame view

common/components/parsers/CustomCsvParser.php 857 Bytes
d0a7acb3   Mihail   refactor CsvParse...
1
2
3
4
5
6
7
8
  <?php
  /**
   * Created by PhpStorm.
   * User: Cibermag
   * Date: 04.09.2015
   * Time: 16:07
   */
  
912e6b15   Mihail   fixed Image class
9
  namespace common\components\parsers;
d0a7acb3   Mihail   refactor CsvParse...
10
11
  
  
1fe29bbe   Mihail   fixed parser and ...
12
  use common\components\CustomVarDamp;
4828b892   Mihail   after merge with ...
13
  
ef41533d   Mihail   temp commit - wor...
14
  use yii\base\ErrorException;
1fe29bbe   Mihail   fixed parser and ...
15
  
181d3f16   Mihail   merge with server
16
  
0c8b9dfc   Mihail   add error excepti...
17
  class CustomCsvParser extends  \yii\multiparser\CsvParser {
d0a7acb3   Mihail   refactor CsvParse...
18
  
97dbfb3f   Administrator   upload project
19
      public $last_line = 10;
7a80e74c   Mihail   add DynamicFormHe...
20
21
      //public $hasHeaderRow = true;
     // public $keys = ['first','second', 'third', 'forth', 'fifth'];
67adc788   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 );
  //    }
  
  
2a7a75b8   Mihail   add first version...
36
  
d0a7acb3   Mihail   refactor CsvParse...
37
  }