mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
start调整 模式定义文件支持定义 run 重新定义要执行的方法,例如:
'run'=>'\\think\cli::run'
This commit is contained in:
13
start.php
13
start.php
@@ -46,10 +46,13 @@ if (APP_HOOK && isset($mode['tags'])) {
|
|||||||
if (APP_AUTO_BUILD && is_file(APP_PATH . 'build.php')) {
|
if (APP_AUTO_BUILD && is_file(APP_PATH . 'build.php')) {
|
||||||
Build::run(include APP_PATH . 'build.php');
|
Build::run(include APP_PATH . 'build.php');
|
||||||
}
|
}
|
||||||
|
if (isset($mode['run'])) {
|
||||||
if (IN_UNIT_TEST) {
|
call_user_func($mode['run']);
|
||||||
Loader::addNamespace('tests', TEST_PATH);
|
|
||||||
} else {
|
} else {
|
||||||
// 执行应用
|
if (IN_UNIT_TEST) {
|
||||||
App::run();
|
Loader::addNamespace('tests', TEST_PATH);
|
||||||
|
} else {
|
||||||
|
// 执行应用
|
||||||
|
App::run();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user