get('/', function(){ return 'Like at Home!'; }); $router->get('posts', function(){ echo Posts::all(); }); $router->get('login', [\ps\app\Controllers\LoginController::class, 'actionGetLoginForm']); $dispatcher = new Dispatcher($router->getData()); try { $response = $dispatcher->dispatch($_SERVER['REQUEST_METHOD'], processInput($_SERVER['REQUEST_URI'])); } catch (Phroute\Exception\HttpRouteNotFoundException $e) { var_dump($e); die(); } catch (Phroute\Exception\HttpMethodNotAllowedException $e) { var_dump($e); die(); } processOutput($response);