summaryrefslogtreecommitdiff
path: root/public/index.php
blob: 4e345a7cb92d03f21a509e38954f56035079df64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

use Engelsystem\Application;
use Engelsystem\Middleware\Dispatcher;
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');
$middleware = $app->getMiddleware();

$dispatcher = new Dispatcher($middleware);
$dispatcher->setContainer($app);

$dispatcher->handle($request);