| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: recordset.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla.Framework 5 * @subpackage Database 6 * @copyright Copyright (C) 2005 - 2010 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 defined('JPATH_BASE') or die(); 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 $pointer= null; 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 /** 50 * @return int 51 */ 52 function RowCount() { 53 return $this->RecordCount(); 54 } 55 56 /** 57 * @return mixed A row from the data array or null 58 */ 59 function FetchRow() 60 { 61 if ($this->pointer < $this->count) { 62 $result = $this->data[$this->pointer]; 63 $this->pointer++; 64 return $result; 65 } else { 66 return null; 67 } 68 } 69 /** 70 * @return array 71 */ 72 function GetRows() { 73 return $this->data; 74 } 75 /** 76 * TODO: Remove for 1.6. Deprecated 77 */ 78 function absolutepage() { 79 return 1; 80 } 81 /** 82 * TODO: Remove for 1.6. Deprecated 83 */ 84 function atfirstpage() { 85 return 1; 86 } 87 /** 88 * TODO: Remove for 1.6. Deprecated 89 */ 90 function atlastpage() { 91 return 1; 92 } 93 /** 94 * TODO: Remove for 1.6. Deprecated 95 */ 96 function lastpageno() { 97 return 1; 98 } 99 /** 100 * TODO: Remove for 1.6. Deprecated 101 */ 102 function Close() { 103 } 104 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |