<?php
/**
*@author 3kZO
*/
require_once(__DIR__ . '/vendor/autoload.php');
use \Framework\App;
use \Framework\exceptions\RouteNotFoundException;
use \Framework\exceptions\ControllerNotFoundException;
use \Framework\exceptions\NotFoundException;
$app = new App([
'app_dir' => __DIR__,
'tpl_dir' => __DIR__ . '/templates'
]);
$app->register(new \Framework\providers\TemplateServiceProvider());
$app->register(new \Framework\providers\SecurityServiceProvider());
$app->mount('/', new \providers\HelloControllerProvider());
try {
$app->run();
} catch (RouteNotFoundException $e) {
echo $e->getMessage();
} catch (ControllerNotFoundException $e) {
echo $e->getMessage();
} catch (NotFoundException $e) {
}