RouteBuilder that allows slashes in the ids.

{@inheritdoc}
772130
public function build(AdminInterface $admin, RouteCollection $collection)
    {
        $collection->add('list');
        $collection->add('create');
        $collection->add('batch', null, [], [], [], '', [], ['POST']);
        $collection->add('edit', $admin->getRouterIdParameter().'/edit', [], ['id' => '.+']);
        $collection->add('delete', $admin->getRouterIdParameter().'/delete', [], ['id' => '.+']);
        $collection->add('export');
        $collection->add('show', $admin->getRouterIdParameter().'/show', [], ['id' => '.+'], [], '', [], ['GET']);

        if ($admin->isAclEnabled()) {
            $collection->add('acl', $admin->getRouterIdParameter().'/acl', [], ['id' => '.+']);
        }

        // add children urls
        foreach ($admin->getChildren() as $children) {
            $collection->addCollection($children->getRoutes());
        }
    }
253705
public CamelControlBusActionBuilder route(String id, String action) {
        super.action.setRouteId(id);
        super.action.setAction(action);
        return this;
    }
245069
public function route(RouterInterface $router, string $path, string $filter, array &$vars) : bool
    {
        $children = $this->getChildren();
        foreach($children as $child) {
            $next = '';
            $res = $child->match($path, $vars, $next);
            if ($res){
                if ($child->route($router, $next, $filter, $vars)){
                    return true;
                }
            }
        }
        return false;
    }
629633
public function getAutoNodeRoutesRecursive(NodeInterface &$node, $base = null, &$routeObjects = array())
    {

        $route = $this->getAutoNodeRoute($node);

        if($route) {


            $route->setRoute(
                $base ? $base . '/' . util::slugify($node->getName())
                    : $this->generateAutoNodeRoute($node)->getRoute()
            );

            // add soft Increment
            $route->setRoute($route->getRoute().$this->softIncrement($route, $routeObjects));


            $routeObjects[] = $route;


            // recursive loop
            foreach ($node->getNodes() as $subnode) {
                if($subnode instanceof RoutableNodeInterface)
                    $this->getAutoNodeRoutesRecursive($subnode, $this->getAutoNodeRoute($node)->getRoute(), $routeObjects);
            }
        }


        return $routeObjects;
    }
1274514
public static function route($nid = 0, $edit = false)
    {
        // Force conversion to string because Codeception uses the Maybe class
        // to represent proper parameters.
        $nid = (string) $nid;
        $pathSuffix = '';

        if (is_numeric($nid) && $nid > 0) {
            $pathSuffix = '/' . $nid;

            if ($edit) {
                $pathSuffix .= '/edit';
            }
        }

        return static::$URL . $pathSuffix;
    }
991791
private function _getUrl($type = 'base', $id = 'null') {
		$modelClass = $this->modelClass;
		$collection = $modelClass::getResourceName();

		switch($type) {
			case 'api':
				return $this->_trailingSlash($modelClass::getApiUrl());
				break;
			case 'collection':
				return $this->_trailingSlash($collection, false);
				break;
			case 'element':
				return $this->_trailingSlash($collection) . $this->_trailingSlash($id, false);
				break;
		}

		return '';
	}
1015790
private function routeRegexpLocales(array $data = null) : string
    {
        if (!is_null($data)) {
            $dest = self::locale();
        } else {
            $dest = '(?:' . implode('|', self::translator()->getLocales()) . ')';
        }

        return $dest;
    }
1196874
protected function matchNestedRouters(
        $method,
        IUrl $url,
        array &$exceptions,
        IRoute $route = null
    ) {
        foreach ($this->getNestedRouters() as $router) {
            $match = $router->matchRouter($method, $url, $exceptions, $route);

            if ($match !== null) {
                $route = $match;
                break;
            }
        }

        return $route;
    }
19247
public function buildRoutePattern()
	{
		$path = $this->prefix ? rtrim($this->prefix . '/' . $this->route, '/') : $this->route;

		return '~^' . preg_replace_callback(self::VAR_PATTERN, function($matches) {
			$this->parameter[] = $key = $matches[1];

			// Shorthand validation only if not set using the validation-method
			if (isset($matches[2]) && !isset($this->parameterPattern[$key])) {
				$this->parameterPattern[$key] = $matches[2];
			}
			return $this->buildParameterPattern($key);
		}, $path) . ($this->terminated ? '$' : '') . '~i';

	}
401717
function serverDecorator (server, id, params = {}) {
  params = joi.attempt(params, internals.scheme.params)

  const route = Object.assign({}, lookupRoute(server, id))
  const routeSections = route.path.match(internals.regexp.params) || []

  routeSections.forEach((routeSection) => {
    const stripped = routeSection.replace(internals.regexp.braces, '')
    let parsed

    if (stripped.includes('?')) {
      parsed = parseOptional(params.params, routeSection, stripped)
    } else if (stripped.includes('*') && stripped.slice(-1) !== '*') {
      parsed = parseMulti(params.params, routeSection, stripped)
    } else {
      parsed = parsePlain(params.params, routeSection, stripped)
    }

    route.path = route.path.replace(parsed.dst, parsed.src)
  })

  if (params.query) {
    route.path += `?${qs.stringify(params.query)}`
    route.path = route.path.replace(/\?$/, '')
  }

  return route.path
}
1196584
public function getRegex(): string
	{
		$route = $this->getRoute();

		if(strpos($route, '?'))
		{
			$route = preg_replace('/\/{(\w+)}\?/', '(?:/{$1})?', $route);
		}

		if(!empty($this->patterns))
		{
			foreach($this->patterns as $key => $pattern)
			{
				$route = str_replace('{' . $key . '}', '(?P<' . $key . '>' . $pattern . ')', $route);
			}
		}

		$route = preg_replace('/{((\d*[a-z_]\d*)+)}/i', '(?P<$1>[^/]++)', $route);

		if($this->hasTrailingSlash)
		{
			$route .= '?';
		}

		return '#^' . $route . '$#su';
	}
760991
public function url($id = null, $additionalEndpoint = null)
    {
        $endpoint = $this->endpoint();

        if (! is_null($id)) {
            $endpoint .= '/' . $id;
        }
        if (! is_null($additionalEndpoint)) {
            $endpoint .= '/' . $additionalEndpoint;
        }

        return $endpoint;
    }
1339688
public static function set404()
    {
        if (!isset(static::$routes['404'])) {
            throw new Exception("There is no 404 route set.");
        }

        // Get request file extension
        $match = preg_match("#(?<extension>" . implode('|', static::$extensions) . ")?$#", Request::$requestUri, $params);
        if (isset($params['extension'])) {
            static::$routes['404']->params['extension'] = $params['extension'];
        }

        return static::setRoute(static::$routes['404']);
    }
864934
private function forceSlash()
    {
        // add a trailing slash to the current URL
        $url = $this->getCurrentFull() . '/';
        // if there is a query string in the current request
        $queryString = $this->getServer('QUERY_STRING');
        if (!empty($queryString)) {
            // add the query string to the redirect URL
            $url .= '?' . $queryString;
        }
        $this->redirect($url);
    }
540857
final public function urlFor($routeName, array $params = array())
    {
        if (null === $this->router) {
            return '';
        }

        return $this->router->urlFor($routeName, $params);
    }
371079
public function map() : void
    {
        $this->router->pattern('id', '\d+');
        $this->router->pattern('hash', '[a-z0-9]+');
        $this->router->pattern('uuid', '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}');
        $this->router->pattern('slug', '[a-z0-9-]+');
        $this->router->pattern('token', '[a-zA-Z0-9]{60}');

        // Allow full domain routing by including dots in the domain regex pattern. Same
        // use-case as subdomains, only this enables you to handle i.e. www.site1.com
        // and www.site2.com within the same Laravel application with a single route or
        // route group.
        $this->router->pattern('domain', '[a-z0-9.]+');
    }
1197089
public function getUrlByInternalName($internalName, $locale, $parameters = array(), $schemeRelative = false)
    {
        $routeParameters = $this->getRouteParametersByInternalName($internalName, $locale, $parameters);

        return $this->generator->generate(
            '_slug',
            $routeParameters,
            $schemeRelative ? UrlGeneratorInterface::NETWORK_PATH : UrlGeneratorInterface::ABSOLUTE_URL
        );
    }