22 lines
407 B
PHP
22 lines
407 B
PHP
|
<?php
|
||
|
namespace common\components\filesystem;
|
||
|
|
||
|
use League\Flysystem\Adapter\Local;
|
||
|
use League\Flysystem\Filesystem;
|
||
|
use trntv\filekit\filesystem\FilesystemBuilderInterface;
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
class LocalFlysystemBuilder implements FilesystemBuilderInterface
|
||
|
{
|
||
|
public $path;
|
||
|
|
||
|
public function build()
|
||
|
{
|
||
|
$adapter = new Local(\Yii::getAlias($this->path));
|
||
|
return new Filesystem($adapter);
|
||
|
}
|
||
|
}
|