split runtime info into runtime preferences

This commit is contained in:
sunxyw
2023-03-09 22:36:20 +08:00
parent 772288b517
commit 510bb8dc30
17 changed files with 126 additions and 134 deletions

View File

@@ -54,10 +54,11 @@ final class ConsoleApplication extends Application
// 初始化内核
/** @var Framework $kernel */
$kernel = Framework::getInstance();
$kernel->setConfigDir($input->getOption('config-dir'));
$kernel->setEnvironment($input->getOption('env'));
$kernel->setDebugMode($input->getOption('debug'));
$kernel->setLogLevel($input->getOption('log-level'));
$kernel->runtime_preferences = $kernel->runtime_preferences
->withConfigDir($input->getOption('config-dir'))
->withEnvironment($input->getOption('env'))
->enableDebugMode($input->getOption('debug'))
->withLogLevel($input->getOption('log-level'));
$kernel->bootstrap();
});