portal.mkgtu.ru/common/components/filesystem/LocalFlysystemBuilder.php

22 lines
407 B
PHP
Raw Normal View History

2024-03-28 09:51:45 +03:00
<?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);
}
}