22 lines
407 B
PHP
Executable File
22 lines
407 B
PHP
Executable File
<?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);
|
|
}
|
|
}
|