Commit 6d2c80fe2d8570caa18c196504577b066c40ef5f

Authored by Mihail
1 parent c3a52936

fix issue with wrong determination file extension

Showing 2 changed files with 6 additions and 2 deletions   Show diff stats
examples/ParserController.php
... ... @@ -88,6 +88,10 @@ class ParserController extends Controller
88 88 return 'xml';
89 89 case 3:
90 90 return 'xlsx';
  91 + case 4:
  92 + return 'xls';
  93 + case 5:
  94 + return 'txt';
91 95 default:
92 96 return 'csv';
93 97 }
... ... @@ -140,7 +144,7 @@ class ParserController extends Controller
140 144 $header_model = DynamicFormHelper::CreateDynamicModel($header_counts);
141 145  
142 146 // колонки для выбора возьмем из конфигурационного файла
143   - $basicColumns = Yii::$app->multiparser->getConfiguration($this->file_extension, 'basic_column');;
  147 + $basicColumns = Yii::$app->multiparser->getConfiguration($this->file_extension, 'basic_column');
144 148  
145 149 return $this->render('results',
146 150 ['model' => $data,
... ...
examples/config.php
... ... @@ -19,7 +19,7 @@ return [
19 19 ],
20 20 'converter_conf' => [
21 21 'class' => 'yii\multiparser\Converter',
22   - 'configuration' => ["encode" => 'Description',
  22 + 'configuration' => ['encode' => 'Description',
23 23 "string" => ['Description', 'Brand'],
24 24 "float" => 'Price',
25 25 "integer" => 'Count'
... ...