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.
24 lines
733 B
PHTML
24 lines
733 B
PHTML
4 years ago
|
<?php
|
||
|
require "../vendor/autoload.php";
|
||
|
|
||
|
use Psr\Http\Message\ResponseInterface as Response;
|
||
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
||
|
use Slim\Factory\AppFactory;
|
||
|
use Slim\Views\Twig;
|
||
|
use Slim\Views\TwigMiddleware;
|
||
|
|
||
|
include "../brain/controller/RouteControl.inc.php";
|
||
|
include "../brain/data/Auth.inc.php";
|
||
|
include "../brain/utility/StringTools.inc.php";
|
||
|
include "../brain/data/Session.inc.php";
|
||
|
|
||
|
$app = AppFactory::create();
|
||
|
$twig = Twig::create("../brain/views/");
|
||
|
$app->add(TwigMiddleware::create($app, $twig));
|
||
|
//set up routing
|
||
|
$app->get("/[{first}[/{second}[/{third}[/{fourth}]]]]", "\RouteControl:get");
|
||
|
$app->post("/[{first}[/{second}[/{third}[/{fourt}]]]]", "\RouteControl:post");
|
||
|
//start the app
|
||
|
|
||
|
$app->run();
|