2017-12-10 19:38:40 +00:00
|
|
|
<?php require_once '../autoloader.php';
|
2016-11-06 16:04:17 +00:00
|
|
|
|
|
|
|
use \router\core\Router;
|
2017-12-10 19:38:40 +00:00
|
|
|
use \api\core\Request;
|
|
|
|
use \api\core\AuthSystemDefault;
|
|
|
|
use \database\core\Repo;
|
|
|
|
use \database\core\DatabaseDriver;
|
2016-11-06 16:04:17 +00:00
|
|
|
|
2017-12-10 19:38:40 +00:00
|
|
|
/* (1) Start session */
|
|
|
|
session_start();
|
2016-11-06 16:04:17 +00:00
|
|
|
|
2017-12-10 19:38:40 +00:00
|
|
|
/* (2) Set default Driver for Repos */
|
|
|
|
Repo::setDriver(DatabaseDriver::get());
|
2016-11-06 16:04:17 +00:00
|
|
|
|
2017-12-10 19:38:40 +00:00
|
|
|
/* (3) Set default AuthSystem */
|
|
|
|
Request::setAuthSystem(new AuthSystemDefault);
|
2016-11-06 16:04:17 +00:00
|
|
|
|
2017-12-10 19:38:40 +00:00
|
|
|
/* (4) launch router */
|
2017-12-12 18:01:28 +00:00
|
|
|
Router::launch($_SERVER['REQUEST_URI']);
|
2016-11-06 16:04:17 +00:00
|
|
|
|