Registers a new route.

@param array $routes A collection of routes to add

@author Benjamin Carl <opensource@clickalicious.de>
970021
protected function registerRoutes(array $routes)
    {
        foreach ($routes as $route => $config) {
            $this->registerRoute($route, $config);
        }
    }
1156300
public function registerPrefixes(array $classes)
    {
        foreach ($classes as $prefix => $locations) {
            $this->prefixes[$prefix] = (array) $locations;
        }
    }
381034
private function application(array $routes)
    {
        // RouteGroup Callable
        return function(\League\Route\RouteGroup $router) use ($routes)
        {
            // Build application routes based on configuration
            foreach ($routes as $route) {
                // Map request to router
                $router->map($route['method'], $route['route'], $route['controller']);
            }
        };
    }
306278
public function add(Route $route)
    {
        foreach ($route->getMethods() as $method) {
            $this->routes[$method][$route->getPath()] = $route;

            $this->allRoutes[$route->getPath()] = $route;
        }

        return $route;
    }
252848
protected function addToCollections($route)
    {
        $domainAndUri = $route->getDomain().$route->uri();

        foreach ($route->methods() as $method) {
            $this->routes[$method][$domainAndUri] = $route;
        }

        $this->allRoutes[$method.$domainAndUri] = $route;
    }
1330474
private function addRoute($name, array $route)
    {
        extract($this->defaults($route));

        $requirements[RouteCollectionBuilder::K_NAME] = $name;

        $this->builder->addRoute($method, $pattern, $handler, $requirements, $defaults);
    }
596884
public function processRoutes($routes)
	{
		if (is_null($this->openAPI->paths)) {
			$this->openAPI->paths = [];
		}

		foreach ($routes as $route) {
			$this->processRoute($route);
		}

	}
411697
function addRoutes(routes) {
        if (isReactChildren(routes)) routes = createRoutesFromReactChildren(routes);

        addRoutesToNamedRoutes(routes, Router.namedRoutes);

        Router.routes.push.apply(Router.routes, routes);
      }
1306075
private function addRoute($name, array $route)
    {
        $this->rawRoutes[$name] = $route;

        $newRoute = new Route(
                $route['pattern'],
                $route['defaults'],
                array_key_exists('requirements', $route) ? $route['requirements'] : []
        );

        $this->add($name, $newRoute);

        $this->log('debug', sprintf('Route `%s` with pattern `%s` defined.', $name, $route['pattern']));
    }
1201004
public function setRoutes(array $routes): TableList
    {
        $this->checkRoutesValidity($routes);
        $this->setAttribute('routes', $routes);

        return $this;
    }
844216
public function setRoutes(RouteCollection $routes)
    {
        foreach ($routes as $route) {
            $route->setContainer($this->container);
        }
        $this->routes = $routes;
        $this->container->instance('routes', $this->routes);
    }
404763
protected function displayRoutes(array $routes)
    {
        $this->table->setHeaders($this->headers)->setRows($routes);

        $this->table->render($this->getOutput());
    }
613685
public function registerMultiple(array $routes)
    {
        foreach ($routes as $route => $route_settings) {
            array_unshift($route_settings, $route);
            call_user_func_array([$this, 'register'], $route_settings);
        }
    }
485250
protected function storeRoute(array $methods, array $route)
    {
        $this->callbacks[] = (object)$route;
        $index             = count($this->callbacks) - 1;

        if (!isset($this->routes[$route['pattern']])) {
            $this->routes[$route['pattern']] = [];
        }

        if ($route['name']) {
            $this->names[$route['name']] = $index;
        }

        foreach ($methods as $method) {
            $this->routes[$route['pattern']][strtoupper($method)] = $index;
        }
    }
22588
public function group(array $routes)
    {
        $group = new Group;
        foreach ($routes as $route)
            $group->set($route);
        return $group;
    }
383951
protected static function mergeRoutes(&$routes, $added) {
		// First level (only) is merged
		foreach( $added as $type => $typeRoutes ) {
			if( isset($routes[$type]) ) {
				$routes[$type] = array_merge($typeRoutes, $routes[$type]);
			} else {
				$routes[$type] = $typeRoutes;
			}
		}
	}
876134
public function addRoutes($routes = array())
    {
        if (!$this->isRegistered()) {
            $this->registerWordpressAction();
        }

        $this->route->addPossibilities($routes);
    }