mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-22 16:15:34 +08:00
let KVInterface extends CacheInterface
This commit is contained in:
@@ -7,6 +7,7 @@ use OneBot\Driver\Coroutine\CoroutineInterface;
|
||||
use OneBot\Driver\Process\ExecutionResult;
|
||||
use OneBot\V12\Object\MessageSegment;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Psr\SimpleCache\CacheInterface;
|
||||
use ZM\Config\ZMConfig;
|
||||
use ZM\Container\ContainerHolder;
|
||||
use ZM\Logger\ConsoleLogger;
|
||||
@@ -259,6 +260,12 @@ function bot(): ZM\Context\BotContext
|
||||
return new \ZM\Context\BotContext('', '');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一个 KV 库实例
|
||||
*
|
||||
* @param string $name KV 库名称
|
||||
* @return CacheInterface
|
||||
*/
|
||||
function kv(string $name = ''): Psr\SimpleCache\CacheInterface
|
||||
{
|
||||
global $kv_class;
|
||||
|
||||
Reference in New Issue
Block a user