protected function registerRoutes() { $this->dispatcher = FastRoute\simpleDispatcher(function (FastRoute\RouteCollector $r) { foreach ($this->routes as list($method, $route, $handler)) { $r->addRoute($method, $route, $handler); } }); }