static function boot() { $pathinfo = request::getPathInfo(); // 生成part if (isset($pathinfo[1])) { if ($p = strpos($pathinfo, '/', 2)) { $part = substr($pathinfo, 0, $p); } else { $part = $pathinfo; } } else { $part = '/'; } if ($part == '/openapi') { return kernel::single('base_rpc_service')->process($pathinfo); } elseif ($part == '/app-doc') { //cachemgr::init(); return kernel::single('base_misc_doc')->display($pathinfo); } // 确认是否安装流程. 如果是安装流程则开启debug. 如果不是则检查是否安装, 如果未安装则跳到安装流程 // 目前其他的url, 都应移到routes中进行 // if ($part == '/setup') { config::set('app.debug', true); } else { static::checkInstalled(); } cacheobject::init(); static::registRouteMiddleware(); $response = route::dispatch(request::instance()); // 临时处理方式 kernel::single('base_session')->close(); $response->send(); exit; }