public function addRoutes($routes)
{
if (!is_array($routes)) {
throw new \InvalidArgumentException("Routes must be an array");
}
$routes = array_filter($routes, function ($route) {
return is_a('Route', $route);
});
$this->routes = array_merge($this->routes, $routes);
}