You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
716 B
PHP
28 lines
716 B
PHP
<?php
|
|
|
|
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');
|
|
|
|
/** @var Application $app */
|
|
$app = app();
|
|
|
|
/** @var ServerRequestInterface $request */
|
|
$request = $app->get('psr7.request');
|
|
|
|
$dispatcher = new Dispatcher([
|
|
SendResponseHandler::class,
|
|
ExceptionHandler::class,
|
|
LegacyMiddleware::class,
|
|
NotFoundResponse::class,
|
|
]);
|
|
$dispatcher->setContainer($app);
|
|
|
|
$dispatcher->handle($request);
|