src/Request/Http/HttpRequest.php
public static function replaceQueryParamInUrl($param, $value, $url)
    {
        $parsedUrl = self::parseUrl($url);
        $queryString = isset($parsedUrl['query']) ? $parsedUrl['query'] : '';
        $queryString = self::replaceQueryParam($param, $value, $queryString);
        $parsedUrl['query'] = $queryString;
        return self::buildUrl($parsedUrl);
    }
public static function replaceQueryParamInUrl($param, $value, $url)
    {
        $parsedUrl = self::parseUrl($url);
        $queryString = isset($parsedUrl['query']) ? $parsedUrl['query'] : '';
        $queryString = self::replaceQueryParam($param, $value, $queryString);
        $parsedUrl['query'] = $queryString;
        return self::buildUrl($parsedUrl);
    }
public static function replaceQueryParamInUrl ( $ param , $ value , $ url ) { $ parsedUrl = self :: parseUrl ( $ url ) ; $ queryString = isset ( $ parsedUrl [ 'query' ] ) ? $ parsedUrl [ 'query' ] : '' ; $ queryString = self :: replaceQueryParam ( $ param , $ value , $ queryString ) ; $ parsedUrl [ 'query' ] = $ queryString ; return self :: buildUrl ( $ parsedUrl ) ; }
Replaces or adds a query parameter to a url.

@param string $param the query param name to replace.
@param mixed $value the query param value to replace.
@param string $url the url.
@return string the updated url.
Replaces or adds a query parameter to a url .