diff options
Diffstat (limited to 'public')
-rw-r--r-- | public/index.php | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/public/index.php b/public/index.php index 88e57252..4e345a7c 100644 --- a/public/index.php +++ b/public/index.php @@ -2,10 +2,6 @@ use Engelsystem\Application; use Engelsystem\Middleware\Dispatcher; -use Engelsystem\Middleware\ExceptionHandler; -use Engelsystem\Middleware\LegacyMiddleware; -use Engelsystem\Middleware\NotFoundResponse; -use Engelsystem\Middleware\SendResponseHandler; use Psr\Http\Message\ServerRequestInterface; require_once realpath(__DIR__ . '/../includes/engelsystem.php'); @@ -15,13 +11,9 @@ $app = app(); /** @var ServerRequestInterface $request */ $request = $app->get('psr7.request'); +$middleware = $app->getMiddleware(); -$dispatcher = new Dispatcher([ - SendResponseHandler::class, - ExceptionHandler::class, - LegacyMiddleware::class, - NotFoundResponse::class, -]); +$dispatcher = new Dispatcher($middleware); $dispatcher->setContainer($app); $dispatcher->handle($request); |