This commit is contained in:
2026-06-28 20:20:20 +08:00
parent 81250722ea
commit a0b975003a
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -295,10 +295,10 @@ class Container implements ContainerInterface
} }
$isController = class_exists(\Kiri\Router\Base\Controller::class) && $reflect->isSubclassOf(\Kiri\Router\Base\Controller::class); $isController = class_exists(\Kiri\Router\Base\Controller::class) && $reflect->isSubclassOf(\Kiri\Router\Base\Controller::class);
$needsProxy = !$isController && class_exists(\Kiri\Router\Annotate\DeferRegistry::class) && \Kiri\Router\Annotate\DeferRegistry::hasAny($className); $needsProxy = !$isController && class_exists(\Kiri\Router\Defer\DeferRegistry::class) && \Kiri\Router\Defer\DeferRegistry::hasAny($className);
if ($needsProxy) { if ($needsProxy) {
$newInstance = \Kiri\Router\Annotate\DeferProxyGenerator::create($className, $construct); $newInstance = \Kiri\Router\Defer\DeferProxyGenerator::create($className, $construct);
} else { } else {
$newInstance = $reflect->newInstanceArgs($construct); $newInstance = $reflect->newInstanceArgs($construct);
} }
@@ -329,10 +329,10 @@ class Container implements ContainerInterface
$construct = $this->getMethodParams($handler); $construct = $this->getMethodParams($handler);
} }
$isController = class_exists(\Kiri\Router\Base\Controller::class) && $reflect->isSubclassOf(\Kiri\Router\Base\Controller::class); $isController = class_exists(\Kiri\Router\Base\Controller::class) && $reflect->isSubclassOf(\Kiri\Router\Base\Controller::class);
$needsProxy = !$isController && class_exists(\Kiri\Router\Annotate\DeferRegistry::class) && \Kiri\Router\Annotate\DeferRegistry::hasAny($reflect->getName()); $needsProxy = !$isController && class_exists(\Kiri\Router\Defer\DeferRegistry::class) && \Kiri\Router\Defer\DeferRegistry::hasAny($reflect->getName());
if ($needsProxy) { if ($needsProxy) {
$newInstance = \Kiri\Router\Annotate\DeferProxyGenerator::create($reflect->getName(), $construct); $newInstance = \Kiri\Router\Defer\DeferProxyGenerator::create($reflect->getName(), $construct);
} else { } else {
$newInstance = $reflect->newInstanceArgs($construct); $newInstance = $reflect->newInstanceArgs($construct);
} }
+2 -2
View File
@@ -599,8 +599,8 @@ class Scanner extends Component
if (method_exists($this->container, 'forgetClass')) { if (method_exists($this->container, 'forgetClass')) {
$this->container->forgetClass($class); $this->container->forgetClass($class);
} }
if (class_exists(\Kiri\Router\Annotate\DeferRegistry::class)) { if (class_exists(\Kiri\Router\Defer\DeferRegistry::class)) {
\Kiri\Router\Annotate\DeferRegistry::removeClass($class); \Kiri\Router\Defer\DeferRegistry::removeClass($class);
} }
} }
} }