This commit is contained in:
as2252258@163.com
2021-04-03 02:31:10 +08:00
parent aebd623a61
commit d840b6d3dd
+15 -2
View File
@@ -17,9 +17,7 @@ use JetBrains\PhpStorm\Pure;
use Snowflake\Abstracts\Config; use Snowflake\Abstracts\Config;
use Snowflake\Application; use Snowflake\Application;
use Snowflake\Error\Logger; use Snowflake\Error\Logger;
use Snowflake\Exception\ComponentException;
use Snowflake\Exception\ConfigException; use Snowflake\Exception\ConfigException;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Snowflake; use Snowflake\Snowflake;
use HttpServer\Http\Context; use HttpServer\Http\Context;
use Snowflake\Core\ArrayAccess; use Snowflake\Core\ArrayAccess;
@@ -309,6 +307,21 @@ if (!function_exists('write')) {
} }
} }
if (!function_exists('redis')) {
/**
* @param string $messages
* @param string $category
* @throws Exception
*/
function redis(): \Snowflake\Cache\Redis|Redis
{
return Snowflake::app()->getRedis();
}
}
if (!function_exists('fire')) { if (!function_exists('fire')) {