Ignore:
Timestamp:
Apr 12, 2008 9:54:45 AM (5 years ago)
Author:
thomasb
Message:

Changed codebase to PHP5 with autoloader + added some new classes from the devel-vnext branch

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/include/rcube_contacts.php

    r1281 r1291  
    33/* 
    44 +-----------------------------------------------------------------------+ 
    5  | program/include/rcube_contacts.inc                                    | 
     5 | program/include/rcube_contacts.php                                    | 
    66 |                                                                       | 
    77 | This file is part of the RoundCube Webmail client                     | 
    8  | Copyright (C) 2006-2007, RoundCube Dev. - Switzerland                 | 
     8 | Copyright (C) 2006-2008, RoundCube Dev. - Switzerland                 | 
    99 | Licensed under the GNU GPL                                            | 
    1010 |                                                                       | 
     
    404404 
    405405 
    406 /** 
    407  * RoundCube result set class. 
    408  * Representing an address directory result set. 
    409  */ 
    410 class rcube_result_set 
    411 { 
    412   var $count = 0; 
    413   var $first = 0; 
    414   var $current = 0; 
    415   var $records = array(); 
    416    
    417   function __construct($c=0, $f=0) 
    418   { 
    419     $this->count = (int)$c; 
    420     $this->first = (int)$f; 
    421   } 
    422    
    423   function rcube_result_set($c=0, $f=0) 
    424   { 
    425     $this->__construct($c, $f); 
    426   } 
    427    
    428   function add($rec) 
    429   { 
    430     $this->records[] = $rec; 
    431   } 
    432    
    433   function iterate() 
    434   { 
    435     return $this->records[$this->current++]; 
    436   } 
    437    
    438   function first() 
    439   { 
    440     $this->current = 0; 
    441     return $this->records[$this->current++]; 
    442   } 
    443    
    444   // alias 
    445   function next() 
    446   { 
    447     return $this->iterate(); 
    448   } 
    449    
    450   function seek($i) 
    451   { 
    452     $this->current = $i; 
    453   } 
    454    
    455 } 
    456  
    457  
    458 ?> 
Note: See TracChangeset for help on using the changeset viewer.