mirror of
https://gitee.com/technical-laohu/mpay_v2_webman.git
synced 2026-04-24 11:04:26 +08:00
1. 调整异常处理类
2. 统一职责分工 3. 清除多余代码
This commit is contained in:
28
app/events/SystemConfig.php
Normal file
28
app/events/SystemConfig.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace app\events;
|
||||
|
||||
use app\repositories\SystemConfigRepository;
|
||||
|
||||
/**
|
||||
* 系统配置相关事件处理
|
||||
*
|
||||
* 负责在配置更新后重新从数据库加载缓存
|
||||
*/
|
||||
class SystemConfig
|
||||
{
|
||||
/**
|
||||
* 重新加载系统配置缓存
|
||||
*
|
||||
* @param mixed $data 事件数据(此处用不到)
|
||||
* @return void
|
||||
*/
|
||||
public function reload($data = null): void
|
||||
{
|
||||
// 通过仓储重新加载缓存
|
||||
$repository = new SystemConfigRepository();
|
||||
$repository->reloadCache();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user