From 78bfeb6e290ac4b011210a2dd8ae3bc8af98b2cd Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sat, 4 Sep 2021 00:11:53 +0800 Subject: [PATCH] 111 --- function.php | 3 ++- http-server/Worker/OnWorkerStart.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/function.php b/function.php index 6920577a..ea69948c 100644 --- a/function.php +++ b/function.php @@ -12,6 +12,7 @@ use Kiri\Abstracts\Config; use Kiri\Application; use Kiri\AspectManager; use Kiri\Core\ArrayAccess; +use Kiri\Di\NoteManager; use Kiri\Error\Logger; use Kiri\Events\EventDispatch; use Kiri\Events\EventProvider; @@ -187,7 +188,7 @@ if (!function_exists('injectRuntime')) { $fileLists = Kiri::getAnnotation()->runtime($path, $exclude); $di = Kiri::getDi(); foreach ($fileLists as $class) { - foreach ($di->getTargetNote($class) as $value) { + foreach (NoteManager::getTargetNote($class) as $value) { $value->execute($class); } $methods = $di->getMethodAttribute($class); diff --git a/http-server/Worker/OnWorkerStart.php b/http-server/Worker/OnWorkerStart.php index 37fbb2b0..3f8c8f93 100644 --- a/http-server/Worker/OnWorkerStart.php +++ b/http-server/Worker/OnWorkerStart.php @@ -7,6 +7,7 @@ use Annotation\Inject; use Exception; use Http\Route\Router; use Kiri\Abstracts\Config; +use Kiri\Di\NoteManager; use Kiri\Exception\ConfigException; use Kiri\Kiri; use Kiri\Runtime; @@ -81,7 +82,7 @@ class OnWorkerStart implements EventDispatcherInterface $fileLists = $this->annotation->runtime(APP_PATH . 'app'); $di = Kiri::getDi(); foreach ($fileLists as $class) { - foreach ($di->getTargetNote($class) as $value) { + foreach (NoteManager::getTargetNote($class) as $value) { $value->execute($class); } $methods = $di->getMethodAttribute($class);