Class Turba_List

Description

The Turba_List:: class provides an interface for dealing with a list of Turba_Objects.

$Horde: turba/lib/List.php,v 1.41.10.10 2010-10-21 19:51:45 jan Exp $

Located in /lib/List.php (line 12)


	
			
Variable Summary
 array $objects
Method Summary
 Turba_List Turba_List ([ $ids = array()])
 integer cmp ( &$a,  &$b, Turba_Object $a, Turba_Object $b)
 void cmp_int ( $a,  $b,  $field)
 void cmp_text ( &$a,  &$b,  $field)
 integer count ()
 void insert (Turba_Object $object)
 void sort ([$order $order = null])
Variables
array $objects = array() (line 19)

The array containing the Turba_Objects represented in this list.

string $_usortCriteria (line 26)

The field to compare objects by.

Methods
Constructor Turba_List (line 31)

Constructor.

Turba_List Turba_List ([ $ids = array()])
  • $ids
cmp (line 178)

Usort helper function.

Compares two Turba_Objects based on the member variable $_usortCriteria, taking care to sort numerically if it is an integer field.

  • return: Comparison of the two field values.
integer cmp ( &$a,  &$b, Turba_Object $a, Turba_Object $b)
cmp_int (line 219)
void cmp_int ( $a,  $b,  $field)
  • $a
  • $b
  • $field
cmp_text (line 206)
void cmp_text ( &$a,  &$b,  $field)
  • &$a
  • &$b
  • $field
count (line 88)

Returns the number of Turba_Objects that are in the list. Use this to hide internal implementation details from client objects.

  • return: The number of objects in the list.
integer count ()
insert (line 49)

Inserts a new object into the list.

void insert (Turba_Object $object)
next (line 76)

Returns the next Turba_Object in the list. Use this to hide internal implementation details from client objects.

  • return: The next object in the list.
Turba_Object next ()
reset (line 65)

Resets our internal pointer to the beginning of the list. Use this to hide the internal storage (array, list, etc.) from client objects.

  • return: The next object in the list.
Turba_Object reset ()
sort (line 102)

Filters/Sorts the list based on the specified sort routine.

The default sort order is by last name, ascending.

void sort ([$order $order = null])
  • $order $order: Array of hashes describing sort fields. Each hash has the following fields: 'field' => String sort field 'ascending' => Boolean indicating sort direction

Documentation generated on Sun, 30 Jan 2011 05:39:25 +0000 by phpDocumentor 1.4.3