driver === null) { $this->setDriver([ 'class' => Local::class, ]); } return $this->driver; } public function setDriver($value) { if (is_array($value)) { $this->driver = \Yii::createObject($value); } else { $this->driver = $value; } } public function getBasePath() { return $this->basePath; } public function setBasePath($value) { $this->basePath = $value; } public function getUploadedFile($name) { if (substr($name, -1) === 's' || $name === 'xlsx'|| $name === 'crt' || $name === 'apk' || $name === 'pfx' || $name === 'cer' || $name === 'pem') { return UploadFile::getInstancesByStorage($name, $this->getDriver(), $this->basePath); } return UploadFile::getInstanceByStorage($name, $this->getDriver(), $this->basePath); } }