/**
  * @param array|array[] $routes
  *
  * @throws \Exception
  */
 protected function addRoutes(array $routes)
 {
     if (empty($routes) || !is_array($routes[0])) {
         throw new \Exception('cannot add route(s)');
     }
     $this->routes = $routes;
     // callback hell...
     $callback = function (RouteCollector $routeCollector) {
         foreach ($this->routes as $route) {
             $routeCollector->addRoute(...$route);
         }
     };
     $this->DispatcherInterface = $this->Router->getDispatcher($callback, Router::GCB);
 }