$objects
$objects : array
The array containing the Turba_Objects represented in this list.
The Turba_List:: class provides an interface for dealing with a list of Turba_Objects.
Copyright 2000-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (ASL). If you did did not receive this file, see http://www.horde.org/licenses/apache.
insert(\Turba_Object $object)
Inserts a new object into the list.
\Turba_Object | $object | The object to insert. |
filter(string $field, array $values) : \Turba_List
Returns a filtered list of objects.
string | $field | The field to filter on. |
array | $values | An array of values that $field must be equal to in order to be returned in the filtered list. |
The filtered list object.
reset() : \Turba_Object
Resets our internal pointer to the beginning of the list. Use this to hide the internal storage (array, list, etc.) from client objects.
The next object in the list.
next() : \Turba_Object
Returns the next Turba_Object in the list. Use this to hide internal implementation details from client objects.
The next object in the list.
sort(array $order = null)
Filters/Sorts the list based on the specified sort routine.
The default sort order is by last name, ascending.
array | $order | Array of hashes describing sort fields. Each hash has the following fields: ascending - (boolean) Sort direction. field - (string) Sort field. |
_cmp(\Turba_Object $a, \Turba_Object $b) : integer
Usort helper function.
Compares two Turba_Objects based on the member variable $_usortCriteria, taking care to sort numerically if it is an integer field.
\Turba_Object | $a | The first Turba_Object to compare. |
\Turba_Object | $b | The second Turba_Object to compare. |
Comparison of the two field values.