mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-10 00:22:48 +08:00
路由到class 改为 路由到 callable 适用于更多的回调机制
This commit is contained in:
@@ -97,9 +97,9 @@ class App
|
||||
// 执行控制器操作
|
||||
$data = Loader::action(self::$dispatch['controller'], self::$dispatch['params']);
|
||||
break;
|
||||
case 'class':
|
||||
// 执行类,例如行为
|
||||
$data = Hook::exec(self::$dispatch['class'], self::$dispatch['method'], self::$dispatch['params']);
|
||||
case 'callable':
|
||||
// 执行回调方法
|
||||
$data = call_user_func_array(self::$dispatch['callable'], self::$dispatch['params']);
|
||||
break;
|
||||
case 'closure':
|
||||
// 规则闭包
|
||||
|
||||
Reference in New Issue
Block a user