@param array $routeParameters

@return string
549388
public function generateUrl(array $routeParameters = []): string
    {
        $url = $this->getUrl();
        $url = \preg_replace('/\{(\w+?):(.+?)\}/', '{$1}', $url);
        foreach ($routeParameters as $parameter => $value) {
            $url = \str_replace('{' . $parameter . '}', $value, $url);
        }

        return $url;
    }
512798
public function postParametersToCurl(array $postParameters)
    {
        $this->formatedParameters = [];
        $curlPostParameters       = '--data "';

        foreach ($this->formatParameters($postParameters) as $key => $value) {
            $curlPostParameters .= sprintf('%s=%s&', $key, $value);
        }

        return substr($curlPostParameters, 0, -1).'"';
    }
689033
public function toUri(array $parameters = [])   
    {
        
        $pattern = $this->getPattern();

        $wildcardsRegexes = $this->wildcardsToRegexGroups(
            $matches = $this->getPatternWildcards()
        );

        $parameters = array_slice($parameters, 0, count($wildcardsRegexes));
        
        $this->validateParametersByWildcards($matches, $parameters);

        $uri = preg_replace($wildcardsRegexes, $parameters, $pattern, 1);

        return '/' . rtrim($uri, '/');

    }
1027899
protected function _params2string($params)
    {
        if (!count($params)) {
            return '';
        }
        $paramsPart = array();
        foreach ($params as $name => $value) {
            if (!$value && ('0' !== $value)) {
                continue;
            }
            $paramsPart[] = str_replace(array('{name}', '{value}'), array($name, urlencode($value)), $this->paramsPairStructure);
        }
        if (!count($paramsPart)) {
            return '';
        }
        return '/' . implode($this->paramsSeparator, $paramsPart);
    }
615987
protected function translateRoutes(array $routes = [])
    {
        foreach ($routes as $routeKey => $routeParams) {
            if (isset($routeParams['description'])) {
                $routes[$routeKey]['description']
                    = $this->translator->translate(
                    $routeParams['description']
                );
            }
            if (isset($routeParams['short_description'])) {
                $routes[$routeKey]['short_description']
                    = $this->translator->translate(
                    $routeParams['short_description']
                );
            }
            if (isset($routeParams['options_descriptions'])) {
                foreach (
                    $routeParams['options_descriptions'] as
                    $optionKey => $optionText
                ) {
                    $routes[$routeKey]['options_descriptions'][$optionKey]
                        = $this->translator->translate(
                        $optionText
                    );
                }
            }
        }

        return $routes;
    }
596374
protected function generatePageUrl($route, array $parameters = array())
    {
//        $parts = explode(' ', trim($page), 2);

//        $route  = implode('_', $parts);

//        $route = str_replace(' ', '_', $route);

        $path = $this->generateUrl($route, $parameters);
//        var_dump($this->getMinkParameter('base_url'));
//        var_dump($path);
//        die;
        if ('Selenium2Driver' === strstr(get_class($this->getSession()->getDriver()), 'Selenium2Driver')) {
            return sprintf('%s%s', $this->getMinkParameter('base_url'), $path);
        }
        
        return $path;
    }
689748
public function generate($routeName, array $parameters = [])
    {
        $route = $this->router->getRoute($routeName);

        $required = $route->getParameterPatterns();
        $missing  = array_diff_key($required, $parameters);

        if (!empty($missing)) {
            $parameters = $this->insertDefaultParameterValues($route, $missing, $parameters);
        }

        return $this->buildPath($route->getPath(), $parameters, array_keys($required));
    }
720656
public function getRouteParam($key)
    {
        if (!isset($this->routeParams[$key])) {
            return false;
        }
        
        return $this->routeParams[$key];
    }
1320600
protected function getURL(array $params):string{
		$url = '';

		if($this->scheme){
			$url .= $this->scheme.':';
		}

		if($this->host){
			$url .= '//'.$this->host;

			if($this->port){
				$url .= ':'.$this->port;
			}

		}

		if($this->path){
			$url .= $this->path;
		}

		if(!empty($params)){
			$url .= '?'.http_build_query($params);
		}

		if($this->fragment){
			$url .= '#'.$this->fragment;
		}

		return $url;
	}
1096357
private function getMatchedVars(RouteInterface $route, array $matches)
    {
        $vars = $route->getContext()->getVars();
        $params = array_merge(
            $route->getDefaults(),
            array_filter(array_map(
                [$this, 'getValue'],
                array_intersect_key(
                    $matches,
                    $t = array_combine($vars, array_pad([], count($vars), null))
                )
            ))
        );

        return array_intersect_key($params, $t);
    }
1341637
public function getRouteParams(AbstractEntity $entity, array $routeParams = [])
    {
        if (count($routeParams) === 0) {

            return [];
        }

        $params = [];
        foreach ($routeParams as $param) {
            if ( ! method_exists($entity, 'get' . ucfirst($param))) {

                trigger_error(
                    'Function "get' . ucfirst($param) . '" does not exist on "' . get_class($entity) . '". Skipping.'
                );
                continue;
            }

            $params[$param] = $entity->{'get' . ucfirst($param)}();
        }

        return $params;
    }
39628
protected function getAbsoluteUrl($route, array $parameters = [], $useRequest = false)
    {
        $request = $this->getContext()->getRequest();

        return $request->getScheme() . '://' . $request->getHost() . $this->getUrl($route, $parameters, $useRequest);
    }
347045
public function getRouteParams()
    {
        if (empty($this->routeParams)) {
            $this->routeParams = Base::instance()->get('PARAMS');
            unset($this->routeParams[0]);
        }

        return $this->routeParams;
    }
540857
final public function urlFor($routeName, array $params = array())
    {
        if (null === $this->router) {
            return '';
        }

        return $this->router->urlFor($routeName, $params);
    }
424908
protected function mapUriPartsFromServerParams(array $params)
    {
        $parts = [];
        
        $map = [
            'PHP_AUTH_USER' => 'user',
            'PHP_AUTH_PWD' => 'password',
            'HTTP_HOST' => 'host',
            'SERVER_PORT' => 'port',
            'REQUEST_URI' => 'path',
            'QUERY_STRING' => 'query'
        ];
        
        foreach ($map as $param => $key) {
            if (isset($params[$param])) {
                $parts[$key] = $params[$param];
            }
        }
        
        return $parts;
    }
1894
protected function getRouteUrlWithBindings($route)
	{
		$urlRouteBindings = [];
		$urlInjectedBindings = [];

		$routeAction = $route->getAction();
		if (isset($routeAction['as'])) {
			if (isset($this->profile['api_calls_bindings'])) {
				foreach ($this->profile['api_calls_bindings'] as $apiCallsBinding) {
					$routesAliases = $apiCallsBinding['routes_aliases'];
					foreach ($routesAliases as $routeAlias) {
						if ($routeAlias == $routeAction['as']) {
							foreach ($apiCallsBinding['bindings'] as $binding) {
								if ($binding['in'] == 'query-route') {
									$urlRouteBindings[$binding['name']] = $binding['value'];
								} else if ($binding['in'] == 'query-injected') {
									$urlInjectedBindings[$binding['name']] = $binding['value'];
								}
							}
						}
					}
				}
			}
		}

		$url = $this->getRouteUri($route);

		foreach ($urlRouteBindings as $name => $value) {
			$url = str_replace('{'.$name.'}', $value, $url);
		}

		if (count($urlInjectedBindings) > 0) {
			$firstName = array_keys($urlInjectedBindings)[0];
			$firstValue = array_shift($urlInjectedBindings);
			$url .= '?' . $firstName . '=' . $firstValue;
			foreach ($urlInjectedBindings as $name => $value) {
				$url .= '&' . $name . '=' . $value;
			}
		}

		return $url;
	}
216583
private function getUriParams($route)
    {
        preg_match_all('~{(\w+)}~', $this->getRouteParam($route, 'uri'), $matches);
        
        return isset($matches[1]) ? $matches[1] : [];
    }