public function export(RouteCollection $routes)
    {
        // Create the output directory.
        if (!is_dir($this->outputDir)) {
            mkdir($this->outputDir, 0777, true);
        }

        // Check if it is writable.
        if (!is_writable($this->outputDir)) {
            throw new \InvalidArgumentException(sprintf('The output directory "%s" is not writable.', $this->outputDir));
        }

        $this->exportRoutes($routes);
    }
public function export(RouteCollection $routes)
    {
        // Create the output directory.
        if (!is_dir($this->outputDir)) {
            mkdir($this->outputDir, 0777, true);
        }

        // Check if it is writable.
        if (!is_writable($this->outputDir)) {
            throw new \InvalidArgumentException(sprintf('The output directory "%s" is not writable.', $this->outputDir));
        }

        $this->exportRoutes($routes);
    }
public function export ( RouteCollection $ routes ) { // Create the output directory. if ( ! is_dir ( $ this -> outputDir ) ) { mkdir ( $ this -> outputDir , 0777 , true ) ; } // Check if it is writable. if ( ! is_writable ( $ this -> outputDir ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The output directory "%s" is not writable.' , $ this -> outputDir ) ) ; } $ this -> exportRoutes ( $ routes ) ; }
Saves the given routes in a routing file.
Creates the output directory if it is not exists.

@param RouteCollection $routes The routes to save.

@throws \InvalidArgumentException If the output directory is not writable.
Saves the given routes in a routing file . Creates the output directory if it is not exists .