* @copyright 2004-2005 Roman Dostovalov * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: Object.php,v 1.3 2005/02/25 16:38:28 quipo Exp $ * @link http://pear.php.net/package/DB_QueryTool */ /** * Include parent class */ require_once 'DB/QueryTool/Result.php'; /** * DB_QueryTool_Result_Row class * * @category Database * @package DB_QueryTool * @author Roman Dostovalov, Com-tec-so S.A. * @copyright 2004-2005 Roman Dostovalov * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @link http://pear.php.net/package/DB_QueryTool */ class DB_QueryTool_Result_Row { /** * create object properties from the array * @param array */ function DB_QueryTool_Result_Row($arr) { foreach ($arr as $key => $value) { $this->$key = $value; } } } // ----------------------------------------------------------------------------- /** * DB_QueryTool_Result_Object class * * @category Database * @package DB_QueryTool * @author Roman Dostovalov, Com-tec-so S.A. * @copyright 2004-2005 Roman Dostovalov * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @link http://pear.php.net/package/DB_QueryTool */ class DB_QueryTool_Result_Object extends DB_QueryTool_Result { // {{{ fetchRow /** * This function emulates PEAR::DB fetchRow() method * With this function DB_QueryTool can transparently replace PEAR::DB * * @todo implement fetchmode support? * @access public * @return void */ function fetchRow() { $arr = $this->getNext(); if (!PEAR::isError($arr)) { $row = new DB_QueryTool_Result_Row($arr); return $row; } return false; } // }}} } ?>