protected function setRoutes($routes)
{
foreach ($routes as $route) {
if ($route instanceof Route) {
$this->routeCollection->addRoute($route);
continue;
}
if (is_array($route)) {
$this->routeCollection->addRouteSpec($route);
$this->mapRouteHandler($route);
continue;
}
}
return $this;
}