hyperf-view/builder/Event/RealDeleteUploadFile.php

63 lines
1.3 KiB
PHP

<?php
/**
* MineAdmin is committed to providing solutions for quickly building web applications
* Please view the LICENSE file that was distributed with this source code,
* For the full copyright and license information.
* Thank you very much for using MineAdmin.
*
* @Author X.Mo<root@imoi.cn>
* @Link https://gitee.com/xmo/MineAdmin
*/
declare(strict_types=1);
namespace Builder\Event;
use App\System\Model\SystemUploadfile;
use League\Flysystem\Filesystem;
class RealDeleteUploadFile
{
protected SystemUploadfile $model;
protected bool $confirm = true;
protected Filesystem $filesystem;
public function __construct(SystemUploadfile $model, Filesystem $filesystem)
{
$this->model = $model;
$this->filesystem = $filesystem;
}
/**
* 获取当前模型实例
* @return SystemUploadfile
*/
public function getModel(): SystemUploadfile
{
return $this->model;
}
/**
* 获取文件处理系统
* @return Filesystem
*/
public function getFilesystem(): Filesystem
{
return $this->filesystem;
}
/**
* 是否删除
* @return bool
*/
public function getConfirm(): bool
{
return $this->confirm;
}
public function setConfirm(bool $confirm): void
{
$this->confirm = $confirm;
}
}