public function setRoutes(array $routes) {

	    foreach($routes as $route) {

	        if(!$route instanceof Route) {
	            throw new \InvalidArgumentException(sprintf("'%s' is not a Route instance.", $route));
            }

            $this->addRoute($route);

        }

    }
public function setRoutes(array $routes) {

	    foreach($routes as $route) {

	        if(!$route instanceof Route) {
	            throw new \InvalidArgumentException(sprintf("'%s' is not a Route instance.", $route));
            }

            $this->addRoute($route);

        }

    }
public function setRoutes ( array $ routes ) { foreach ( $ routes as $ route ) { if ( ! $ route instanceof Route ) { throw new \ InvalidArgumentException ( sprintf ( "'%s' is not a Route instance." , $ route ) ) ; } $ this -> addRoute ( $ route ) ; } }
assign routes to router

@param Route[] $routes
assign routes to router