$this->app['hook']->listen('module_init');
try {
// 实例化控制器
$instance = $this->app->controller($this->controller,
$this->rule->getConfig('url_controller_layer'),
$this->rule->getConfig('controller_suffix'),
$this->rule->getConfig('empty_controller'));
} catch (ClassNotFoundException $e) {
throw new HttpException(404, 'controller not exists:' . $e->getClass());
}
$this->app['middleware']->controller(function (Request $request, $next) use ($instance) {
// 获取当前操作名
$action = $this->actionName . $this->rule->getConfig('action_suffix');
if (is_callable([$instance, $action])) {
// 执行操作方法
$call = [$instance, $action];
USER | vhost |
HOME | /home/vhost |
HTTP_REFERER | https://www.huazan.com/huayu/3391.html |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
HTTP_HOST | huazan.com |
REDIRECT_STATUS | 200 |
SERVER_NAME | huazan.com |
SERVER_PORT | 443 |
SERVER_ADDR | 10.10.1.1 |
REMOTE_PORT | 52602 |
REMOTE_ADDR | 3.230.128.106 |
SERVER_SOFTWARE | nginx/1.21.4 |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | on |
REQUEST_SCHEME | https |
SERVER_PROTOCOL | HTTP/2.0 |
DOCUMENT_ROOT | /vhost/public |
DOCUMENT_URI | /index.php |
REQUEST_URI | /huayu/3391.html |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=/huayu/3391.html |
SCRIPT_FILENAME | /vhost/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1710848195.7067 |
REQUEST_TIME | 1710848195 |
APP_PATH | /vhost/public/application/ |
HOSPITAL | 1 |
DOCTOR | 2 |
ARTICLE | 3 |
PROJECT | 4 |
STRATEGY | 5 |