private function setRoutes(array $routes)
    {
        $this->routes = [];

        foreach ($routes as $name => $route) {
            $this->add($name, $route);
        }
    }
private function setRoutes(array $routes)
    {
        $this->routes = [];

        foreach ($routes as $name => $route) {
            $this->add($name, $route);
        }
    }
private function setRoutes ( array $ routes ) { $ this -> routes = [ ] ; foreach ( $ routes as $ name => $ route ) { $ this -> add ( $ name , $ route ) ; } }
Sets the initial route collection.

@param array $routes

@return void
Sets the initial route collection .