$this->app['hook']->listen('module_init');
// 实例化控制器
try {
$instance = $this->app->controller($controller,
$this->app->config('app.url_controller_layer'),
$this->app->config('app.controller_suffix'),
$this->app->config('app.empty_controller'));
} catch (ClassNotFoundException $e) {
throw new HttpException(404, 'controller not exists:' . $e->getClass());
}
// 获取当前操作名
$action = $actionName . $this->app->config('app.action_suffix');
if (is_callable([$instance, $action])) {
// 执行操作方法
$call = [$instance, $action];
// 自动获取请求变量