You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.0 KiB
PHTML
73 lines
2.0 KiB
PHTML
17 years ago
|
<?php
|
||
|
|
||
|
/*
|
||
|
+-----------------------------------------------------------------------+
|
||
|
| program/include/rcube_result_set.php |
|
||
|
| |
|
||
14 years ago
|
| This file is part of the Roundcube Webmail client |
|
||
13 years ago
|
| Copyright (C) 2006-2011, The Roundcube Dev Team |
|
||
13 years ago
|
| |
|
||
|
| Licensed under the GNU General Public License version 3 or |
|
||
|
| any later version with exceptions for skins & plugins. |
|
||
|
| See the README file for a full license statement. |
|
||
17 years ago
|
| |
|
||
|
| PURPOSE: |
|
||
|
| Class representing an address directory result set |
|
||
|
| |
|
||
|
+-----------------------------------------------------------------------+
|
||
|
| Author: Thomas Bruederli <roundcube@gmail.com> |
|
||
|
+-----------------------------------------------------------------------+
|
||
|
*/
|
||
|
|
||
|
|
||
|
/**
|
||
14 years ago
|
* Roundcube result set class.
|
||
17 years ago
|
* Representing an address directory result set.
|
||
|
*
|
||
12 years ago
|
* @package Framework
|
||
|
* @subpackage Addressbook
|
||
17 years ago
|
*/
|
||
|
class rcube_result_set
|
||
|
{
|
||
15 years ago
|
var $count = 0;
|
||
|
var $first = 0;
|
||
|
var $current = 0;
|
||
13 years ago
|
var $searchonly = false;
|
||
15 years ago
|
var $records = array();
|
||
|
|
||
|
|
||
|
function __construct($c=0, $f=0)
|
||
|
{
|
||
|
$this->count = (int)$c;
|
||
|
$this->first = (int)$f;
|
||
|
}
|
||
|
|
||
|
function add($rec)
|
||
|
{
|
||
|
$this->records[] = $rec;
|
||
|
}
|
||
14 years ago
|
|
||
15 years ago
|
function iterate()
|
||
|
{
|
||
|
return $this->records[$this->current++];
|
||
|
}
|
||
14 years ago
|
|
||
15 years ago
|
function first()
|
||
|
{
|
||
|
$this->current = 0;
|
||
|
return $this->records[$this->current++];
|
||
|
}
|
||
14 years ago
|
|
||
15 years ago
|
// alias for iterate()
|
||
|
function next()
|
||
|
{
|
||
|
return $this->iterate();
|
||
|
}
|
||
14 years ago
|
|
||
15 years ago
|
function seek($i)
|
||
|
{
|
||
|
$this->current = $i;
|
||
|
}
|
||
14 years ago
|
|
||
15 years ago
|
}
|