-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
25 lines (22 loc) · 737 Bytes
/
Copy pathindex.php
File metadata and controls
25 lines (22 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
if (PHP_SAPI == 'cli-server') {
// To help the built-in PHP dev server, check if the request was actually for
// something which should probably be served as a static file
$url = parse_url($_SERVER['REQUEST_URI']);
$file = __DIR__ . $url['path'];
if (is_file($file)) {
return false;
}
}
require __DIR__ . '/vendor/autoload.php';
use App\Configs\RoutesConfig;
use App\Configs\SlimConfig;
use App\Configs\ControllersConfig;
use App\Configs\MiddlewaresConfig;
$settings = new SlimConfig();
$app = $settings->getApp();
$container = $settings->getContainer();
$controllers = new ControllersConfig($container);
$routes = new RoutesConfig($app);
$middlewares = new MiddlewaresConfig($app);
$app->run();