ArrayItemIterator Class Reference
[Db]

Provides paging and iteration for arrays. More...

Inheritance diagram for ArrayItemIterator:

ItemIterator

List of all members.

Public Member Functions

 ArrayItemIterator (&$theArray, $page=-1, $itemsPerPage=-1)
 atFirstPage ()
 atLastPage ()
 eof ()
 getCount ()
getLastPageRangeInfo ()
 getPage ()
 getPageCount ()
 isInBounds ()
next ()
nextWithKey ()
toArray ()
 wasEmpty ()

Public Attributes

 $wasEmpty


Detailed Description

Provides paging and iteration for arrays.

Definition at line 20 of file ArrayItemIterator.inc.php.


Member Function Documentation

ArrayItemIterator.ArrayItemIterator ( &$  theArray,
page = -1,
itemsPerPage = -1 
)

Constructor.

Parameters:
$theArray array The array of items to iterate through
$page int the current page number
$itemsPerPage int Number of items to display per page

Definition at line 42 of file ArrayItemIterator.inc.php.

References wasEmpty().

ArrayItemIterator.atFirstPage (  ) 

Determine whether or not this iterator represents the first page

Returns:
boolean

Reimplemented from ItemIterator.

Definition at line 87 of file ArrayItemIterator.inc.php.

ArrayItemIterator.atLastPage (  ) 

Determine whether or not this iterator represents the last page

Returns:
boolean

Reimplemented from ItemIterator.

Definition at line 95 of file ArrayItemIterator.inc.php.

ArrayItemIterator.eof (  ) 

Return a boolean indicating whether or not we've reached the end of results

Returns:
boolean

Reimplemented from ItemIterator.

Definition at line 127 of file ArrayItemIterator.inc.php.

ArrayItemIterator.getCount (  ) 

Get the total count of items

Returns:
int

Reimplemented from ItemIterator.

Definition at line 111 of file ArrayItemIterator.inc.php.

& ArrayItemIterator.getLastPageRangeInfo (  ) 

Get the range info representing the last page of results.

Returns:
object DBResultRange

Definition at line 179 of file ArrayItemIterator.inc.php.

References getPageCount().

ArrayItemIterator.getPage (  ) 

Get the current page number

Returns:
int

Reimplemented from ItemIterator.

Definition at line 103 of file ArrayItemIterator.inc.php.

ArrayItemIterator.getPageCount (  ) 

Get the number of pages

Returns:
int

Reimplemented from ItemIterator.

Definition at line 119 of file ArrayItemIterator.inc.php.

Referenced by getLastPageRangeInfo(), and isInBounds().

ArrayItemIterator.isInBounds (  ) 

Determine whether or not the iterator is within bounds.

Returns:
boolean

Definition at line 171 of file ArrayItemIterator.inc.php.

References getPageCount().

& ArrayItemIterator.next (  ) 

Return the next item in the iterator.

Returns:
object

Reimplemented from ItemIterator.

Definition at line 61 of file ArrayItemIterator.inc.php.

Referenced by nextWithKey().

& ArrayItemIterator.nextWithKey (  ) 

Return the next item in the iterator, with key.

Returns:
array (key, value)

Reimplemented from ItemIterator.

Definition at line 77 of file ArrayItemIterator.inc.php.

References next().

& ArrayItemIterator.toArray (  ) 

Convert this iterator to an array

Returns:
array

Reimplemented from ItemIterator.

Definition at line 143 of file ArrayItemIterator.inc.php.

ArrayItemIterator.wasEmpty (  ) 

Return a boolean indicating whether or not this iterator was empty from the beginning

Returns:
boolean

Reimplemented from ItemIterator.

Definition at line 135 of file ArrayItemIterator.inc.php.

Referenced by ArrayItemIterator().


Member Data Documentation

ArrayItemIterator.$wasEmpty

Whether or not the iterator was empty from the start

Definition at line 34 of file ArrayItemIterator.inc.php.


The documentation for this class was generated from the following file:

Generated on Mon Jul 14 10:55:39 2008 for Open Journal Systems by  doxygen 1.5.6