public static function filter_urlQuery(&$url, $filterArr, $method = null, array $add = array()) {
        if ($method === null) {
            $method = 'remove';
        }

        $pUrl = parse_url($url);
        $qry;
        if (isset($pUrl['query'])) {
            parse_str($pUrl['query'], $qry);
        } else {
            $qry = array();
        }
        
        self::filter_data($qry, $filterArr, $method, $add);

        $pUrl['query'] = http_build_query($qry);
        if (empty($pUrl['query'])) {
            unset($pUrl['query']);
        }
        $url = self::unparse_url($pUrl);
    }
public static function filter_urlQuery(&$url, $filterArr, $method = null, array $add = array()) {
        if ($method === null) {
            $method = 'remove';
        }

        $pUrl = parse_url($url);
        $qry;
        if (isset($pUrl['query'])) {
            parse_str($pUrl['query'], $qry);
        } else {
            $qry = array();
        }
        
        self::filter_data($qry, $filterArr, $method, $add);

        $pUrl['query'] = http_build_query($qry);
        if (empty($pUrl['query'])) {
            unset($pUrl['query']);
        }
        $url = self::unparse_url($pUrl);
    }
public static function filter_urlQuery ( & $ url , $ filterArr , $ method = null , array $ add = array ( ) ) { if ( $ method === null ) { $ method = 'remove' ; } $ pUrl = parse_url ( $ url ) ; $ qry ; if ( isset ( $ pUrl [ 'query' ] ) ) { parse_str ( $ pUrl [ 'query' ] , $ qry ) ; } else { $ qry = array ( ) ; } self :: filter_data ( $ qry , $ filterArr , $ method , $ add ) ; $ pUrl [ 'query' ] = http_build_query ( $ qry ) ; if ( empty ( $ pUrl [ 'query' ] ) ) { unset ( $ pUrl [ 'query' ] ) ; } $ url = self :: unparse_url ( $ pUrl ) ; }
Parses an url adds and removes get-query arguments and rebuilds the url.

@param string $url       the url string
@param array  $filterArr Array of query keys that should be removed or kept.
@param string $method    'remove' deletes all $filterArr keys from query,
'keep' deletes all args that are not in $filterArr
@param array  $add       optional array of values to be added to the query
@return void
Parses an url adds and removes get - query arguments and rebuilds the url .