MDB_QueryTool
[ class tree: MDB_QueryTool ] [ index: MDB_QueryTool ] [ all elements ]

Source for file Object.php

Documentation is available at Object.php

  1. <?php
  2. // +----------------------------------------------------------------------+
  3. // | PHP Version 4                                                        |
  4. // +----------------------------------------------------------------------+
  5. // | Copyright (c) 1997-2003 The PHP Group                                |
  6. // +----------------------------------------------------------------------+
  7. // | This source file is subject to version 2.02 of the PHP license,      |
  8. // | that is bundled with this package in the file LICENSE, and is        |
  9. // | available at through the world-wide-web at                           |
  10. // | http://www.php.net/license/2_02.txt.                                 |
  11. // | If you did not receive a copy of the PHP license and are unable to   |
  12. // | obtain it through the world-wide-web, please send a note to          |
  13. // | license@php.net so we can mail you a copy immediately.               |
  14. // +----------------------------------------------------------------------+
  15. // | Author:  Roman Dostovalov, Com-tec-so S.A.<roman.dostovalov@ctco.lv> |
  16. // +----------------------------------------------------------------------+
  17. //
  18. // $Id: Object.php,v 1.1 2004/04/27 23:49:45 quipo Exp $
  19. //
  20.  
  21. /**
  22.  * Include parent class
  23.  */
  24. require_once 'MDB/QueryTool/Result.php';
  25.  
  26. // ------------------------------------------------------------------------
  27.  
  28. /**
  29.  *    Result row class
  30.  */
  31. class MDB_QueryTool_Result_Row
  32. {
  33.     /**
  34.      * create object properties from the array
  35.      * @param array 
  36.      */
  37.     function MDB_QueryTool_Result_Row($arr)
  38.     {
  39.         foreach ($arr as $key => $value{
  40.             $this->$key $value;
  41.         }
  42.     }
  43. }
  44.  
  45. // ------------------------------------------------------------------------
  46.  
  47. /**
  48.  * @package    MDB_QueryTool
  49.  * @access     public
  50.  * @author     Roman Dostovalov <roman.dostovalov@ctco.lv>
  51.  */
  52. {
  53.     // {{{ fetchRow
  54.  
  55.     /**
  56.      * This function emulates PEAR::MDB fetchRow() method
  57.      * With this function MDB_QueryTool can transparently replace PEAR::MDB
  58.      *
  59.      * @todo implement fetchmode support?
  60.      * @access    public
  61.      * @return    void 
  62.      */
  63.     function fetchRow()
  64.     {
  65.         $arr $this->getNext();
  66.         if (!PEAR::isError($arr)) {
  67.             $row = new MDB_QueryTool_Result_Row($arr);
  68.             return $row;
  69.         }
  70.         return false;
  71.     }
  72.  
  73.     // }}}
  74. }
  75. ?>

Documentation generated on Mon, 11 Mar 2019 13:57:13 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.