protected function getRoutesResolver()
    {
        return function () {
            // Create fast-route collector
            $routeCollector = new RouteCollector(new RouteParser, new DataGenerator);

            // Get routes data from application
            foreach ($this->getRoutes() as $route) {
                $routeCollector->addRoute($route['method'], $route['uri'], $route['action']);
            }

            return $routeCollector->getData();
        };
    }