mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
app_init标签支持重定向和请求缓存
This commit is contained in:
@@ -79,20 +79,20 @@ class App
|
|||||||
{
|
{
|
||||||
is_null($request) && $request = Request::instance();
|
is_null($request) && $request = Request::instance();
|
||||||
|
|
||||||
$config = self::initCommon();
|
|
||||||
if (defined('BIND_MODULE')) {
|
|
||||||
// 模块/控制器绑定
|
|
||||||
BIND_MODULE && Route::bind(BIND_MODULE);
|
|
||||||
} elseif ($config['auto_bind_module']) {
|
|
||||||
// 入口自动绑定
|
|
||||||
$name = pathinfo($request->baseFile(), PATHINFO_FILENAME);
|
|
||||||
if ($name && 'index' != $name && is_dir(APP_PATH . $name)) {
|
|
||||||
Route::bind($name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$request->filter($config['default_filter']);
|
|
||||||
try {
|
try {
|
||||||
|
$config = self::initCommon();
|
||||||
|
if (defined('BIND_MODULE')) {
|
||||||
|
// 模块/控制器绑定
|
||||||
|
BIND_MODULE && Route::bind(BIND_MODULE);
|
||||||
|
} elseif ($config['auto_bind_module']) {
|
||||||
|
// 入口自动绑定
|
||||||
|
$name = pathinfo($request->baseFile(), PATHINFO_FILENAME);
|
||||||
|
if ($name && 'index' != $name && is_dir(APP_PATH . $name)) {
|
||||||
|
Route::bind($name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$request->filter($config['default_filter']);
|
||||||
|
|
||||||
// 开启多语言机制
|
// 开启多语言机制
|
||||||
if ($config['lang_switch_on']) {
|
if ($config['lang_switch_on']) {
|
||||||
|
|||||||
Reference in New Issue
Block a user