2005-09-10 19:25:43 +02:00
|
|
|
<?php
|
2017-08-29 16:21:25 +02:00
|
|
|
|
2018-08-07 03:18:22 +02:00
|
|
|
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;
|
2017-11-01 12:35:45 +01:00
|
|
|
|
|
|
|
require_once realpath(__DIR__ . '/../includes/engelsystem.php');
|
2011-06-01 14:30:29 +02:00
|
|
|
|
2018-08-07 03:18:22 +02:00
|
|
|
/** @var Application $app */
|
|
|
|
$app = app();
|
2013-12-09 17:10:07 +01:00
|
|
|
|
2018-08-07 03:18:22 +02:00
|
|
|
/** @var ServerRequestInterface $request */
|
|
|
|
$request = $app->get('psr7.request');
|
2017-01-03 03:22:48 +01:00
|
|
|
|
2018-08-07 03:18:22 +02:00
|
|
|
$dispatcher = new Dispatcher([
|
|
|
|
SendResponseHandler::class,
|
|
|
|
ExceptionHandler::class,
|
|
|
|
LegacyMiddleware::class,
|
|
|
|
NotFoundResponse::class,
|
2016-09-29 11:28:42 +02:00
|
|
|
]);
|
2018-08-07 03:18:22 +02:00
|
|
|
$dispatcher->setContainer($app);
|
|
|
|
|
|
|
|
$dispatcher->handle($request);
|