/** * start application. */ public function run() { foreach (glob(APP_DIR . 'controllers/*') as $file) { include $file; } Router::dispatch(); }
<?php use Linger\Core\Router; Router::get('/(index\\.html)?', function (\Linger\Core\View $view) { $view->assign('name', 'Linger'); $view->display('index/index.html'); });