Skip to content

Commit

Permalink
非启动服务器的命令,现在不再输出 imi Logo 和环境信息
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Jul 3, 2020
1 parent 335d03b commit 6f80731
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/App.php
Expand Up @@ -99,8 +99,6 @@ public static function run($namespace)
static::checkEnvironment();
self::set(ProcessAppContexts::PROCESS_NAME, ProcessType::MASTER, true);
self::set(ProcessAppContexts::MASTER_PID, getmypid(), true);
static::outImi();
static::outStartupInfo();
static::initFramework($namespace);
if(!isset($_SERVER['argv'][1]))
{
Expand Down Expand Up @@ -142,6 +140,12 @@ private static function checkEnvironment()
public static function initFramework(string $namespace)
{
static::$namespace = $namespace;
$isServerStart = ('server/start' === ($_SERVER['argv'][1] ?? null));
if($isServerStart)
{
self::outImi();
self::outStartupInfo();
}
AnnotationManager::init();
static::$runtimeInfo = new RuntimeInfo;
static::$container = new Container;
Expand All @@ -157,7 +161,7 @@ public static function initFramework(string $namespace)
return;
}
// 框架运行时缓存支持
if($isServerStart = ('server/start' === ($_SERVER['argv'][1] ?? null)))
if($isServerStart)
{
$result = false;
}
Expand Down

0 comments on commit 6f80731

Please sign in to comment.