Commit 002559aa0739e9700e521a8d51bf0272d2676f2f
1 parent
0c8b9dfc
add multiparser yii component
Showing
2 changed files
with
6 additions
and
2 deletions
Show diff stats
backend/config/main.php
backend/models/UploadFileParsingForm.php
| @@ -52,8 +52,7 @@ class UploadFileParsingForm extends Model | @@ -52,8 +52,7 @@ class UploadFileParsingForm extends Model | ||
| 52 | 52 | ||
| 53 | public function readFile($filePath){ | 53 | public function readFile($filePath){ |
| 54 | 54 | ||
| 55 | - $parser = new ParserHandler( $filePath ); | ||
| 56 | - $data = $parser->run(); | 55 | + $data = Yii::$app->multiparser->parse($filePath); |
| 57 | 56 | ||
| 58 | if( !is_array($data) ){ | 57 | if( !is_array($data) ){ |
| 59 | $data = ['No results']; | 58 | $data = ['No results']; |