This commit is contained in:
2023-04-19 10:51:08 +08:00
parent be6953b83f
commit b2066bfad7
6 changed files with 30 additions and 328 deletions
+4 -4
View File
@@ -843,13 +843,13 @@ if (!function_exists('on')) {
/**
* @param $name
* @param $callback
* @param bool $isAppend
* @throws Exception
* @param int $index
* @throws
*/
function on($name, $callback, bool $isAppend = TRUE): void
function on($name, $callback, int $index = 0): void
{
$pro = di(EventProvider::class);
$pro->on($name, $callback, 0);
$pro->on($name, $callback, $index);
}
}