From 3e3124fe22fc345a93d4554df1805eccb696b64b Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Wed, 7 Apr 2021 23:50:11 +0800 Subject: [PATCH] modify --- System/Application.php | 2 ++ System/Runtime.php | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 System/Runtime.php diff --git a/System/Application.php b/System/Application.php index 648461dd..2c54bf2f 100644 --- a/System/Application.php +++ b/System/Application.php @@ -136,7 +136,9 @@ class Application extends BaseApplication try { fire(Event::SERVER_BEFORE_START); + /** @var Console $manager */ $manager = Snowflake::app()->get('console'); + $manager->register(Runtime::class); $manager->setParameters($argv); $class = $manager->search(); response()->send($manager->execCommand($class)); diff --git a/System/Runtime.php b/System/Runtime.php new file mode 100644 index 00000000..cf59c651 --- /dev/null +++ b/System/Runtime.php @@ -0,0 +1,37 @@ +getAnnotation(); + $annotation->read(APP_PATH, 'App'); + + $runtime = storage('runtime.php'); + + Snowflake::writeFile($runtime, serialize($annotation->getLoader())); + } + +}