public function next()
{
$this->index++;
}
function routeRequest() { $dispatched = false; while ($route = $this->router->route($this->request)) { $params = array_values($route->params); $continue = $this->dispatcher->execute($route->callback, $params); $dispatched = true; if (!$continue) { break; } $this->router->next(); $dispatched = false; } if (!$dispatched) { echo '404'; } }