main/public_html/index.php

22 lines
508 B
PHP
Raw Normal View History

<?php require_once '../autoloader.php';
use \router\core\Router;
use \database\core\Repo;
use \api\core\Request;
use \api\core\AuthSystemDefault;
use \database\core\DatabaseDriver;
/* (1) Start session */
2017-11-23 11:57:49 +00:00
session_start();
// $_SESSION['PERM'] = ['journalist'];
/* (2) Set default Driver for Repos */
Repo::setDriver(DatabaseDriver::get());
/* (3) Set default AuthSystem */
Request::setAuthSystem(new AuthSystemDefault);
/* (4) launch router */
$MainRouter = Router::launch($_GET['url']);