public function getWithQuery(array $data, $mark = true)
    {
        if ($this->hasQuery()) {
            $url = null;

            if ($mark === true) {
                $url = '?';
            }

            $url .= http_build_query(array_merge($this->getQuery(), $data));
            $url = str_replace('%25s', '%s', $url);

            return $url;

        } else {
            return null;
        }
    }
public function getWithQuery(array $data, $mark = true)
    {
        if ($this->hasQuery()) {
            $url = null;

            if ($mark === true) {
                $url = '?';
            }

            $url .= http_build_query(array_merge($this->getQuery(), $data));
            $url = str_replace('%25s', '%s', $url);

            return $url;

        } else {
            return null;
        }
    }
public function getWithQuery ( array $ data , $ mark = true ) { if ( $ this -> hasQuery ( ) ) { $ url = null ; if ( $ mark === true ) { $ url = '?' ; } $ url .= http_build_query ( array_merge ( $ this -> getQuery ( ) , $ data ) ) ; $ url = str_replace ( '%25s' , '%s' , $ url ) ; return $ url ; } else { return null ; } }
Returns current query with merged data

@param array $data Data to be merged with current query
@param boolean $mark Whether to prepend question mark
@return string
Returns current query with merged data