This commit is contained in:
as2252258@163.com
2021-04-04 17:12:41 +08:00
parent c7e059f104
commit 1391c36687
4 changed files with 247 additions and 184 deletions
+20
View File
@@ -588,6 +588,26 @@ if (!function_exists('listen')) {
}
if (!function_exists('event')) {
/**
* @param $name
* @param $callback
* @param $params
* @param $isAppend
* @throws Exception
* @throws Exception
*/
function event($name, $callback, $params = [], $isAppend = true)
{
$event = Snowflake::app()->getEvent();
$event->on($name, $callback, $params, $isAppend);
}
}
if (!function_exists('alias')) {
/**