Update of /cvsroot/phpweather/phpweather In directory usw-pr-cvs1:/tmp/cvs-serv15391 Modified Files: db_none.php Log Message: I've removed all methods but the three essential ones: get_metar(), insert_metar() and update_metar(). These are the only functions that other classes should expect to be present in a database object. Index: db_none.php =================================================================== RCS file: /cvsroot/phpweather/phpweather/db_none.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- db_none.php 2001/03/30 13:25:36 1.3 +++ db_none.php 2001/04/02 15:55:40 1.4 @@ -29,81 +29,8 @@ } /** - * Establishes a connection to the database. + * Pretends to insert a METAR into the database. * - * @return boolean Since there's no database with this back-end, this function will always return true. - * @access public - * @see disconnect() - */ - function connect() { - return true; - } - - /** - * Disconnects from the database. - * - * @return boolean Since we don't really use a database, this will always return true. - * @access public - * @see connect() - */ - function disconnect() { - return true; - } - - /** - * Selects a database. - * - * @return boolean This function always returns false, since that should stop users from trying to use the database. - * @access public - */ - function select_db() { - return false; - } - - /** - * Executes a SQL-query. - * - * @param string The SQL-statement. - * @return boolean We can't execute SQL with no database, we return false. - * @access public - */ - function query($query) { - return false; - } - - /** - * Fetches a row as an array from the database. - * - * @return array We can't fetch rows with no database, so we return an empty array. - * @access public - */ - function fetch_row() { - return array(); - } - - /** - * Fetches a row as an associative array from the database. - * - * @return array We can't fetch rows with no database, so we return an empty array. - * @access public - */ - function fetch_array() { - return array(); - } - - /** - * Returns the number of rows in the result-set. - * - * @return integer This doesn't make any sense with no database. - * @access public - */ - function num_rows() { - return 0; - } - - /** - * Inserts a METAR into the database. - * * @param string The ICAO of the station. * @param string The raw METAR. * @param integer A standard UNIX timestamp. @@ -115,7 +42,7 @@ } /** - * Updates an existing METAR in the database. + * Pretends to update an existing METAR in the database. * * @param string The ICAO of the station. * @param string The raw METAR. @@ -128,7 +55,7 @@ } /** - * Gets a METAR form the database. + * Pretends to return a METAR form the database. * * @param string The ICAO of the station. * @return string Since we don't have a database, we just return an empty string. _______________________________________________ PHPWeather-checkins mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/phpweather-checkins