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