public function getQueryVar($key, $default = null)
  {
    if(!$this->hasQuery()) return $default;

    parse_str($this->query, $queryArray);

    if(array_key_exists($key, $queryArray))
    {
      $val = $queryArray[$key];

      if(ctype_digit($val))
      {
        return intval($val);
      }
      elseif(is_string($val))
      {
        return new String($val);
      }
      else
      {
        return $val;
      }
    }

    return $default;
  }
public function getQueryVar($key, $default = null)
  {
    if(!$this->hasQuery()) return $default;

    parse_str($this->query, $queryArray);

    if(array_key_exists($key, $queryArray))
    {
      $val = $queryArray[$key];

      if(ctype_digit($val))
      {
        return intval($val);
      }
      elseif(is_string($val))
      {
        return new String($val);
      }
      else
      {
        return $val;
      }
    }

    return $default;
  }
public function getQueryVar ( $ key , $ default = null ) { if ( ! $ this -> hasQuery ( ) ) return $ default ; parse_str ( $ this -> query , $ queryArray ) ; if ( array_key_exists ( $ key , $ queryArray ) ) { $ val = $ queryArray [ $ key ] ; if ( ctype_digit ( $ val ) ) { return intval ( $ val ) ; } elseif ( is_string ( $ val ) ) { return new String ( $ val ) ; } else { return $ val ; } } return $ default ; }
Returns a single variable from the query string.

@param  string $key
@param  mixed  $default
@return mixed
Returns a single variable from the query string .