Commit 9d57a9ea303ec87e77d937a0608047b0e256ebc9
1 parent
9075f464
try organize ini settings
Showing
3 changed files
with
24 additions
and
3 deletions
Show diff stats
backend/components/parsers/config.php
backend/controllers/ParserController.php
... | ... | @@ -68,13 +68,19 @@ class ParserController extends BaseController |
68 | 68 | $model = new UploadFileParsingForm(); |
69 | 69 | // установим режим, 0 - ручная загрузка, 1 - автозагрузка |
70 | 70 | $model->mode = $mode; |
71 | - | |
71 | + //CustomVarDamp::dumpAndDie(phpinfo()); | |
72 | 72 | return $this->render('index', ['model' => $model]); |
73 | 73 | } |
74 | 74 | |
75 | +// public function beforeAction($action) | |
76 | +// { | |
77 | +// if($action->actionMethod ='actionResults'){ | |
78 | +// CustomVarDamp::dumpAndDie(phpinfo()); | |
79 | +// } | |
80 | +// } | |
81 | + | |
75 | 82 | public function actionResults($mode = 0) |
76 | 83 | { |
77 | - | |
78 | 84 | $model = new UploadFileParsingForm(['mode' => $mode]); |
79 | 85 | $data = []; |
80 | 86 | if ($model->load(Yii::$app->request->post())) { | ... | ... |
vendor/yiisoft/multiparser/YiiMultiparser.php
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | |
9 | 9 | namespace yii\multiparser; |
10 | 10 | |
11 | +use common\components\CustomVarDamp; | |
11 | 12 | use yii\base\Component; |
12 | 13 | |
13 | 14 | |
... | ... | @@ -37,5 +38,15 @@ public $configuration; |
37 | 38 | return $parser->run(); |
38 | 39 | |
39 | 40 | } |
40 | - | |
41 | + | |
42 | + public function init() | |
43 | + { | |
44 | + if( isset($this->configuration['glob']) && isset($this->configuration['glob']['ini'])){ | |
45 | + foreach ($this->configuration['glob']['ini'] as $ini_setting => $ini_setting_value) { | |
46 | + ini_set( $ini_setting, $ini_setting_value ); | |
47 | + } | |
48 | + } | |
49 | + | |
50 | + } | |
51 | + | |
41 | 52 | } |
42 | 53 | \ No newline at end of file | ... | ... |