protected function generateRouterFile(RouteCollectionContract $routes): void
    {
        $routerCompiler = new RouteTreeCompiler(new RouteTreeBuilder(), new RouteTreeOptimizer());
        $closure        = $routerCompiler->compile($routes->getRoutes());

        \file_put_contents($this->path, $closure, \LOCK_EX);
    }
protected function generateRouterFile(RouteCollectionContract $routes): void
    {
        $routerCompiler = new RouteTreeCompiler(new RouteTreeBuilder(), new RouteTreeOptimizer());
        $closure        = $routerCompiler->compile($routes->getRoutes());

        \file_put_contents($this->path, $closure, \LOCK_EX);
    }
protected function generateRouterFile ( RouteCollectionContract $ routes ) : void { $ routerCompiler = new RouteTreeCompiler ( new RouteTreeBuilder ( ) , new RouteTreeOptimizer ( ) ) ; $ closure = $ routerCompiler -> compile ( $ routes -> getRoutes ( ) ) ; \ file_put_contents ( $ this -> path , $ closure , \ LOCK_EX ) ; }
Generates a router file with all routes.

@param \Viserio\Component\Contract\Routing\RouteCollection $routes

@return void
Generates a router file with all routes .