public function run() { if (empty($this->language)) { throw new \yii\base\Exception('Language must be specified.'); } if (empty($this->category)) { throw new \yii\base\Exception('Message category must be specified.'); } if (empty($this->targetAttribute)) { throw new \yii\base\Exception('Target model attribute must be specified.'); } FileHelper::loadFile($this->sourceUrl, ['destDir' => $this->tmpPath, 'onLoad' => [$this, 'resolveFile']]); FileHelper::removeDirectory($this->tmpPath); }
public function run() { FileHelper::loadFile($this->sourceUrl, ['destDir' => $this->tmpPath, 'onLoad' => [$this, 'resolveFile']]); FileHelper::removeDirectory($this->tmpPath); }