src/Library/Helper/Url.php
public static function setParameter($var = '', $val = false, $url = false, $rebuild = true)
    {
        $url_entree = $url;
        if (!$url || !is_array($url)) {
            $_url = $url ? $url : self::getRequestUrl();
            $url = self::parse($_url);
        }
        $url['params'][$var] = $val;
        if ($rebuild) {
            return self::build($url);
        }
        return $url;
    }
public static function setParameter($var = '', $val = false, $url = false, $rebuild = true)
    {
        $url_entree = $url;
        if (!$url || !is_array($url)) {
            $_url = $url ? $url : self::getRequestUrl();
            $url = self::parse($_url);
        }
        $url['params'][$var] = $val;
        if ($rebuild) {
            return self::build($url);
        }
        return $url;
    }
public static function setParameter ( $ var = '' , $ val = false , $ url = false , $ rebuild = true ) { $ url_entree = $ url ; if ( ! $ url || ! is_array ( $ url ) ) { $ _url = $ url ? $ url : self :: getRequestUrl ( ) ; $ url = self :: parse ( $ _url ) ; } $ url [ 'params' ] [ $ var ] = $ val ; if ( $ rebuild ) { return self :: build ( $ url ) ; } return $ url ; }
Set the value of an URL parameter

@param   string/bool     $var        A parameter to get, or `false` to get the global parameters array
@param   string/false    $val        The value of the `$param` argument (if `null`, the argument is stripped)
@param   string/false    $url        The URL to work on (`self::getRequestUrl()` by default)
@param   bool            $rebuild    Return a rebuilt URL (`true` by dfault - if `false`, the URL components array is returned)
@return  string/array    The final URL
Set the value of an URL parameter