2017-11-23 10:23:09 +00:00
|
|
|
<?php require_once '../autoloader.php';
|
|
|
|
|
|
|
|
use \router\core\Router;
|
2017-11-24 15:00:12 +00:00
|
|
|
use \database\core\Repo;
|
2017-11-26 11:07:28 +00:00
|
|
|
use \api\core\Request;
|
|
|
|
use \api\core\AuthSystemDefault;
|
2017-11-24 15:00:12 +00:00
|
|
|
use \database\core\DatabaseDriver;
|
2017-11-23 10:23:09 +00:00
|
|
|
|
2017-11-24 15:00:12 +00:00
|
|
|
/* (1) Start session */
|
2017-11-23 11:57:49 +00:00
|
|
|
session_start();
|
2017-11-24 15:00:12 +00:00
|
|
|
|
|
|
|
/* (2) Set default Driver for Repos */
|
|
|
|
Repo::setDriver(DatabaseDriver::get());
|
|
|
|
|
2017-11-26 11:07:28 +00:00
|
|
|
/* (3) Set default AuthSystem */
|
|
|
|
Request::setAuthSystem(new AuthSystemDefault);
|
|
|
|
|
|
|
|
/* (4) launch router */
|
2017-11-28 12:32:44 +00:00
|
|
|
Router::launch($_GET['url']);
|
2017-11-23 10:23:09 +00:00
|
|
|
|