code: public function query(array $params = NULL) {
          if ($params === NULL) {
              // Use only the current parameters
              $params = $this->request->get();
          } else {
              // Merge the current and new parameters
              $params = array_merge($this->request->get(), $params);
          }
  
          if (empty($params)) {
              // No query parameters
              return '';
          }
  
          // Note: http_build_query returns an empty string for a params array with only NULL values
          $query = http_build_query($params, '', '&');
  
          // Don't prepend '?' to an empty string
          return ($query === '') ? '' : ('?' . $query);
      }
docs: URL::query() replacement for Pagination use only
  
  @param    array    Parameters to override
  @return    string