This commit is contained in:
2023-04-16 02:58:01 +08:00
parent a22de4ea3a
commit 7a4aa11b25
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ class ControllerInterpreter
$container = \Kiri::getDi(); $container = \Kiri::getDi();
$parameters = $container->getMethodParams($reflectionMethod); $parameters = $container->getMethodParams($reflectionMethod);
return new Handler([$reflectionClass->getName(), $reflectionMethod->getName()], $parameters); return new Handler([$container->get($reflectionClass->getName()), $reflectionMethod->getName()], $parameters);
} }
} }
+2 -1
View File
@@ -179,10 +179,11 @@ class RouterCollector implements \ArrayAccess, \IteratorAggregate
/** /**
* @param string $path * @param string $path
* @return Handler * @return Handler
* @throws ReflectionException
*/ */
private function NotFundHandler(string $path): Handler private function NotFundHandler(string $path): Handler
{ {
return new Handler([NotFoundController::class, 'fail'], []); return new Handler([di(NotFoundController::class), 'fail'], []);
} }
/** /**