engelsystem/public/index.php

20 lines
459 B
PHP
Raw Normal View History

<?php
2018-08-07 03:18:22 +02:00
use Engelsystem\Application;
use Engelsystem\Middleware\Dispatcher;
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');
2018-08-12 00:08:52 +02:00
$middleware = $app->getMiddleware();
2017-01-03 03:22:48 +01:00
2018-08-12 00:08:52 +02:00
$dispatcher = new Dispatcher($middleware);
2018-08-07 03:18:22 +02:00
$dispatcher->setContainer($app);
$dispatcher->handle($request);