Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5
Source code for file /joomla/database/recordset.php

Documentation is available at recordset.php

  1. <?php
  2. /**
  3. @version        $Id: recordset.php 4449 2006-08-09 22:07:55Z eddiea $
  4. @package        Joomla.Framework
  5. @subpackage    Database
  6. @copyright    Copyright (C) 2005 - 2007 Open Source Matters. All rights reserved.
  7. @license        GNU/GPL, see LICENSE.php
  8. *  Joomla! is free software. This version may have been modified pursuant
  9. *  to the GNU General Public License, and as distributed it includes or
  10. *  is derivative of works licensed under the GNU General Public License or
  11. *  other free or open source software licenses.
  12. *  See COPYRIGHT.php for copyright notices and details.
  13. */
  14.  
  15. /**
  16.  * Simple Record Set object to allow our database connector to be used with
  17.  * ADODB driven 3rd party libraries
  18.  *
  19.  * @package        Joomla.Framework
  20.  * @subpackage    Database
  21.  * @since        1.5
  22.  */
  23. class JRecordSet
  24. {
  25.     /** @var array */
  26.     var $data    = null;
  27.     /** @var int Index to current record */
  28.     var $pointernull;
  29.     /** @var int The number of rows of data */
  30.     var $count    = null;
  31.  
  32.     /**
  33.      * Constuctor
  34.      * @param array 
  35.      */
  36.     function JRecordSet$data )
  37.     {
  38.         $this->data = $data;
  39.         $this->pointer = 0;
  40.         $this->count = count$data );
  41.     }
  42.     /**
  43.      * @return int 
  44.      */
  45.     function RecordCount({
  46.         return $this->count;
  47.     }
  48.     /**
  49.      * @return mixed A row from the data array or null
  50.      */
  51.     function FetchRow()
  52.     {
  53.         if ($this->pointer < $this->count{
  54.             $result $this->data[$this->pointer];
  55.             $this->pointer++;
  56.             return $result;
  57.         else {
  58.             return null;
  59.         }
  60.     }
  61.     /**
  62.      * @return array 
  63.      */
  64.     function GetRows({
  65.         return $this->data;
  66.     }
  67.     /**
  68.      * TODO: No working
  69.      */
  70.     function absolutepage({
  71.         return 1;
  72.     }
  73.     /**
  74.      * TODO: No working
  75.      */
  76.     function atfirstpage({
  77.         return 1;
  78.     }
  79.     /**
  80.      * TODO: No working
  81.      */
  82.     function atlastpage({
  83.         return 1;
  84.     }
  85.     /**
  86.      * TODO: No working
  87.      */
  88.     function lastpageno({
  89.         return 1;
  90.     }
  91.     /**
  92.      * TODO: No working
  93.      */
  94.     function Close({
  95.     }
  96. }

Documentation generated on Mon, 05 Mar 2007 21:19:59 +0000 by phpDocumentor 1.3.1