mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
Merge branch 'master' of https://github.com/top-think/framework
This commit is contained in:
@@ -272,13 +272,14 @@ class App
|
|||||||
Hook::listen('module_init', $request);
|
Hook::listen('module_init', $request);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
$instance = Loader::controller($controller, $config['url_controller_layer'], $config['use_controller_suffix'], $config['empty_controller']);
|
||||||
|
|
||||||
// 获取当前操作名
|
// 获取当前操作名
|
||||||
$action = $actionName . $config['action_suffix'];
|
$action = $actionName . $config['action_suffix'];
|
||||||
if (!preg_match('/^[A-Za-z](\w)*$/', $action)) {
|
if (!preg_match('/^[A-Za-z](\w)*$/', $action)) {
|
||||||
// 非法操作
|
// 非法操作
|
||||||
throw new \ReflectionException('illegal action name :' . $actionName);
|
throw new \ReflectionException('illegal action name :' . $actionName);
|
||||||
}
|
}
|
||||||
$instance = Loader::controller($controller, $config['url_controller_layer'], $config['use_controller_suffix'], $config['empty_controller']);
|
|
||||||
|
|
||||||
// 执行操作方法
|
// 执行操作方法
|
||||||
$call = [$instance, $action];
|
$call = [$instance, $action];
|
||||||
|
|||||||
Reference in New Issue
Block a user