eee
This commit is contained in:
+2
-12
@@ -6,19 +6,16 @@ namespace Kiri\Router;
|
||||
|
||||
|
||||
use Closure;
|
||||
use Exception;
|
||||
use Kiri;
|
||||
use Kiri\Router\Base\NotFoundController;
|
||||
use Kiri\Router\Constrict\RequestMethod;
|
||||
use Kiri\Di\Inject\Container;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
use ReflectionException;
|
||||
use ReflectionMethod;
|
||||
use Throwable;
|
||||
use Traversable;
|
||||
use Kiri\Router\Base\Middleware;
|
||||
use Kiri\Router\Format\ResponseFormat;
|
||||
|
||||
|
||||
/**
|
||||
@@ -58,12 +55,6 @@ class RouterCollector implements \ArrayAccess, \IteratorAggregate
|
||||
protected array $httpHandler = [];
|
||||
|
||||
|
||||
/**
|
||||
* @var array<string, object>
|
||||
*/
|
||||
protected array $controllers = [];
|
||||
|
||||
|
||||
/**
|
||||
* @var Handler
|
||||
*/
|
||||
@@ -91,8 +82,7 @@ class RouterCollector implements \ArrayAccess, \IteratorAggregate
|
||||
{
|
||||
$found = di(NotFoundController::class);
|
||||
|
||||
$reflection = new ReflectionMethod($found, 'fail');
|
||||
$this->found = new Handler([$found, 'fail'], $reflection);
|
||||
$this->found = new Handler([$found, 'fail'], [], ResponseFormat::class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user