Returns the path for provided route and parameters

@param string $name
@param array $parameters
@param bool $relative

@return string
161022
public static function getPath( $name, $parameters = array(), $relative = false )
    {
        $serviceContainer = ezpKernel::instance()->getServiceContainer();

        return $serviceContainer->get('router')->generate(
            $name,
            $parameters,
            $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH
        );
    }
987921
public function path($name, array $parameters = [], $relative = false)
    {
        if ($name instanceof TreeNodeInterface) {
            return $this->router->generate($name, $parameters, $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH);
        } elseif ($name instanceof ContentTreeContext) {
            return $this->router->generate($name->getNode(), $parameters, $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH);
        } elseif ($name instanceof ElementStructureValue) {
            if ($name->getType() === 'link') {
                $link = $name->getValue();
                if ($link['type'] === 'internal' || $link['type'] === 'intrasiteroot') {
                    $tree = $this->contentTreeManager->findByTreeId($link['tid']);
                    if ($tree) {
                        $node = $tree->get($link['tid']);

                        return $this->router->generate(
                            $node,
                            $parameters,
                            $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH
                        );
                    }
                } elseif ($link['type'] === 'external') {
                    return $link['url'];
                } elseif ($link['type'] === 'mailto') {
                    return 'mailto:'.$link['recipient'];
                }
            }
        } elseif (is_array($name) && isset($name['type']) && in_array($name['type'], array('internal', 'intrasiteroot', 'external', 'mailto'))) {
            $link = $name;
            if ($link['type'] === 'internal' || $link['type'] === 'intrasiteroot') {
                $tree = $this->contentTreeManager->findByTreeId($link['tid']);
                if ($tree) {
                    $node = $tree->get($link['tid']);

                    return $this->router->generate(
                        $node,
                        $parameters,
                        $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH
                    );
                }
            } elseif ($link['type'] === 'external') {
                return $link['url'];
            } elseif ($link['type'] === 'mailto') {
                return 'mailto:'.$link['recipient'];
            }
        } elseif (strlen($name) && (is_int($name) || (int) $name)) {
            $tree = $this->contentTreeManager->findByTreeId((int) $name);
            if ($tree) {
                $node = $tree->get((int) $name);

                return $this->router->generate($node, $parameters, $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH);
            }
        } elseif (is_string($name)) {
            return $this->router->generate($name, $parameters, $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH);
        }

        return '';
    }
1173140
public function getRoute($name, array $args = [])
    {
        $name = strtolower($name);

        if (isset($this->routes[$name])) {
            $route = $this->routes[$name];

            foreach ($args as $k => $v) {
                $route = str_replace(':' . $k, $v, $route);
            }
            return $route;
        }
        return null;
    }
757913
public function route(string $name, array $parameters = [], bool $absolute = true): self
    {
        $this->route = route($name, $parameters, $absolute);

        $this->active([$this->route, $this->route.'/*']);

        return $this;
    }
337068
public function route($name, $parameters = [])
    {
        $route = router()->route($name);
        if (is_null($route)) {
            throw new \Exception("Route name [$name] not found");
        }

        $route_url = $route->url($parameters);

        return $this->to($route_url);
    }
1343364
public function route($name, $parameters = [], $absolute = true)
    {
        return app('url')->route($this->prefixRoute($name), $parameters, $absolute);
    }
1165350
public function getRoute($name, array $params = null)
    {
        if (!isset($this->routes[ $name ])) {
            throw new RouteNotFoundException('The path does not exist.');
        }

        $route = $this->routes[ $name ];

        $prefix = !$this->isRewrite()
            ? '?'
            : '';

        $path = $route[ 'path' ];

        if (!empty($params) && isset($route[ 'with' ])) {
            foreach ($route[ 'with' ] as $key => $value) {
                if (!preg_match('/^' . $value . '$/', $params[ $key ])) {
                    throw new RouteArgumentException($params[ $key ], $value, $path);
                }
                $path = str_replace($key, $params[ $key ], $path);
            }
        }

        return $this->basePath . $prefix . $path;
    }
321581
public static function url(string $name, ?array $parameters = [])
  {
    $url = null;

    foreach (Swish::$routes as $route) {
      if ($route['name'] == $name) {
        $url = $route['pattern'];

        if ($route['required'] > 0 && ($route['required'] == count($parameters))) {
          foreach ($parameters as $name => $parameter) {
            $url = str_replace('{' . $name . '}', $parameter, $url);
          }
        }
      }
    }

    if (str_contains($url, ['{', '}'])) $url = null;

    return $url;
  }
480107
public function getParameter(string $name): string
    {
        if (!isset($this->values[$name])) {
            throw new \InvalidArgumentException("Invalid route parameter '$name'");
        }

        return $this->values[$name];
    }
870742
protected function getPath($name)
    {
        if ($this->app['config']->get('filters.path'))
            return $this->app['config']->get('filters.path') . '/' . class_basename($name) . '.php';
        else return parent::getPath($name);
    }
1255768
public function getTopicPath(Tag $tag, array $parameters = [], bool $relative = false): string
    {
        return $this->topicUrlGenerator->generate(
            $tag,
            $parameters,
            $relative ?
                UrlGeneratorInterface::RELATIVE_PATH :
                UrlGeneratorInterface::ABSOLUTE_PATH
        );
    }
1122201
public function getFullRouteUrlByName($name, array $parameters = [])
    {
        $routeUrl = $this->router->getRouteUrlByName($name, $parameters);
        if ($routeUrl === null) {
            return null;
        }
        return $this->url->getUrl($routeUrl);
    }
1308384
public function path($route, $parameters = array())
    {
        return $this->silex['url_generator']->generate($route, $parameters, \Symfony\Component\Routing\Generator\UrlGeneratorInterface::ABSOLUTE_PATH);
    }
984169
public static function get($name, $var = [], $absolute = false) {
        $routes = self::resolveStatic(RESOLVE_ROUTE, $name);

        if (isset($routes[0]['' . $routes[1] . ''])) {
            $route = $routes[0]['' . $routes[1] . ''];

            $url = preg_replace('#\((.*)\)#isU', '<($1)>', $route['url']);
            $urls = explode('<', $url);
            $result = '';
            $i = 0;

            foreach ($urls as $url) {
                if (preg_match('#\)>#', $url)) {
                    if (count($var) > 0) {
                        if (isset($var[$i])) {
                            $result .= preg_replace('#\((.*)\)>#U', $var[$i], $url);
                        }
                        else {
                            $result .= preg_replace('#\((.*)\)>#U', '', $url);
                        }

                        $i++;
                    }
                }
                else {
                    $result .= $url;
                }
            }

            $result = preg_replace('#\\\.#U', '.', $result);

            if (Config::config()['user']['framework']['folder'] != '') {
                $folder = Config::config()['user']['framework']['folder'];

                if ($absolute == false) {
                    return '/' . substr($folder, 0, strlen($folder) - 1) . $result;
                }
                else {
                    if (Config::config()['user']['output']['https'])
                        return 'https://' . $_SERVER['HTTP_HOST'] . $folder . $result;
                    else
                        return 'http://' . $_SERVER['HTTP_HOST'] . $folder . $result;
                }
            }
            else {
                if ($absolute == false) {
                    if ($result == '') {
                        return '/';
                    }
                    else {
                        return $result;
                    }
                }
                else {
                    if (Config::config()['user']['output']['https'])
                        return 'https://' . $_SERVER['HTTP_HOST'] . $result;
                    else
                        return 'http://' . $_SERVER['HTTP_HOST'] . $result;
                }
            }
        }

        return null;
    }
600326
public function signedRoute($name, $parameters = [], $expiration = null, $absolute = true)
    {
        $parameters = $this->formatParameters($parameters);

        if ($expiration) {
            $parameters = $parameters + ['expires' => $this->availableAt($expiration)];
        }

        ksort($parameters);

        $key = call_user_func($this->keyResolver);

        return $this->route($name, $parameters + [
            'signature' => hash_hmac('sha256', $this->route($name, $parameters, $absolute), $key),
        ], $absolute);
    }
1101350
public function getPathNode($nodeId, $parameters = array(), $relative = false)
    {
        $node = $this->getNode($nodeId);

        return $this->getPath($node->getId(), $parameters, $relative);
    }
1116737
public static function url($name, $parameters = []) {
		return URequest::getUrl ( self::getRouteByName ( $name, $parameters, false ) );
	}