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