From 58f1eeb91c63397298b90e00cfe2388109157fa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 23 Feb 2022 16:54:34 +0800 Subject: [PATCH] modify plugin name --- function.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/function.php b/function.php index 6605ecfa..171ae5de 100644 --- a/function.php +++ b/function.php @@ -240,11 +240,11 @@ if (!function_exists('injectRuntime')) { function injectRuntime(string $path, array $exclude = []) { $fileLists = Kiri::getAnnotation()->runtime($path, $exclude); - $di = Kiri::getDi(); $router = []; foreach ($fileLists as $class) { - $targetAttributes = TargetManager::get($class)->getAttributes(); + $target = TargetManager::get($class); + $targetAttributes = $target->getAttributes(); foreach ($targetAttributes as $value) { $value = $value->newInstance(); if (!method_exists($value, 'execute')) { @@ -253,7 +253,7 @@ if (!function_exists('injectRuntime')) { $value->execute($class); } - $methods = TargetManager::get($class)->getMethodsAttribute(); + $methods = $target->getMethodsAttribute(); foreach ($methods as $method => $attribute) { if (empty($attribute)) { continue;