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);