| Total Complexity | 5 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | class LocalAdapter extends Adapter |
||
| 23 | { |
||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | public $path; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @inheritdoc |
||
| 31 | */ |
||
| 32 | public static function displayName(): string |
||
| 33 | { |
||
| 34 | return Yii::t('yuncms', 'Local Folder'); |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @inheritdoc |
||
| 39 | */ |
||
| 40 | public function init() |
||
| 41 | { |
||
| 42 | if ($this->path === null) { |
||
| 43 | throw new InvalidConfigException('The "path" property must be set.'); |
||
| 44 | } |
||
| 45 | $this->path = Yii::getAlias($this->path); |
||
| 46 | parent::init(); |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return Local |
||
| 51 | */ |
||
| 52 | protected function prepareAdapter() |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @inheritdoc |
||
| 59 | */ |
||
| 60 | public function getRootPath(): string |
||
| 63 | } |
||
| 64 | } |