public static function queryString($params, $parent = null, $callback = 'rawurlencode', $ignoreNonValues = true)
    {
        $params = self::flattenRequestVars($params, $parent);
        $ret = [];
        foreach ($params as $pair) {
            list($name, $value) = $pair;
            if (!$value && $ignoreNonValues) {
                continue;
            }
            if ($callback) {
                $value = call_user_func($callback, $value);
            }
            $ret[] = sprintf('%s=%s', $name, $value);
        }
        return implode('&', $ret);
    }
public static function queryString($params, $parent = null, $callback = 'rawurlencode', $ignoreNonValues = true)
    {
        $params = self::flattenRequestVars($params, $parent);
        $ret = [];
        foreach ($params as $pair) {
            list($name, $value) = $pair;
            if (!$value && $ignoreNonValues) {
                continue;
            }
            if ($callback) {
                $value = call_user_func($callback, $value);
            }
            $ret[] = sprintf('%s=%s', $name, $value);
        }
        return implode('&', $ret);
    }
public static function queryString ( $ params , $ parent = null , $ callback = 'rawurlencode' , $ ignoreNonValues = true ) { $ params = self :: flattenRequestVars ( $ params , $ parent ) ; $ ret = [ ] ; foreach ( $ params as $ pair ) { list ( $ name , $ value ) = $ pair ; if ( ! $ value && $ ignoreNonValues ) { continue ; } if ( $ callback ) { $ value = call_user_func ( $ callback , $ value ) ; } $ ret [ ] = sprintf ( '%s=%s' , $ name , $ value ) ; } return implode ( '&' , $ ret ) ; }
Construct a query string from the parameters

@param array $params
@param null $parent
@param string $callback
@param bool $ignoreNonValues
@return string
Construct a query string from the parameters