From 01f64914212b2ea7d4929439563c33cd1de57741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 16 Aug 2021 17:23:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Route/Router.php | 28 ++++++++++++++-------------- Server/Worker/OnServerWorker.php | 2 +- System/Application.php | 6 +++--- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/HttpServer/Route/Router.php b/HttpServer/Route/Router.php index 66364e90..33b06c52 100644 --- a/HttpServer/Route/Router.php +++ b/HttpServer/Route/Router.php @@ -548,20 +548,20 @@ class Router extends HttpService implements RouterInterface public function _loader() { $this->loadRouteDir(APP_PATH . 'routes'); - $classes = Kiri::getAnnotation()->runtime(CONTROLLER_PATH); - - $di = Kiri::getDi(); - foreach ($classes as $class) { - $methods = $di->getMethodAttribute($class); - foreach ($methods as $method => $attribute) { - if (empty($attribute)) { - continue; - } - foreach ($attribute as $item) { - $item->execute($class, $method); - } - } - } +// $classes = Kiri::getAnnotation()->runtime(CONTROLLER_PATH); +// +// $di = Kiri::getDi(); +// foreach ($classes as $class) { +// $methods = $di->getMethodAttribute($class); +// foreach ($methods as $method => $attribute) { +// if (empty($attribute)) { +// continue; +// } +// foreach ($attribute as $item) { +// $item->execute($class, $method); +// } +// } +// } } /** diff --git a/Server/Worker/OnServerWorker.php b/Server/Worker/OnServerWorker.php index 386931ea..d9932ca3 100644 --- a/Server/Worker/OnServerWorker.php +++ b/Server/Worker/OnServerWorker.php @@ -54,7 +54,7 @@ class OnServerWorker extends \Server\Abstracts\Server $this->eventDispatch->dispatch(new OnWorkerStart($server, $workerId)); $this->workerInitExecutor($server, $annotation, $workerId); - $this->interpretDirectory($annotation); +// $this->interpretDirectory($annotation); $this->eventDispatch->dispatch(new OnAfterWorkerStart()); } diff --git a/System/Application.php b/System/Application.php index 9c8de963..4e0b0883 100644 --- a/System/Application.php +++ b/System/Application.php @@ -153,9 +153,9 @@ class Application extends BaseApplication $manager = Kiri::app()->get('console'); $manager->register(Runtime::class); $class = $manager->setParameters($argv)->search(); - if (!($class instanceof Command)) { - scan_directory(directory('app'), 'App'); - } +// if (!($class instanceof Command)) { + scan_directory(directory('app'), 'App'); +// } $data = di(Response::class)->getBuilder($manager->execCommand($class)); } catch (\Throwable $exception) { $data = di(Response::class)->getBuilder(logger()->exception($exception));