function check($str = '') { $route = $this->router->route($this->request); $params = array_values($route->params); $this->assertTrue(is_callable($route->callback)); call_user_func_array($route->callback, $params); $this->expectOutputString($str); }
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'; } }