Open Journal Systems  3.3.0
ItemIterator Class Reference
Inheritance diagram for ItemIterator:
ArrayItemIterator DAOResultFactory DBRowIterator VirtualArrayIterator

Public Member Functions

 __construct ()
 
 atFirstPage ()
 
 atLastPage ()
 
 eof ()
 
 getCount ()
 
 getPage ()
 
 getPageCount ()
 
 next ()
 
 nextWithKey ()
 
 toArray ()
 
 wasEmpty ()
 

Detailed Description

Generic iterator class; needs to be overloaded by subclasses providing specific implementations.

Definition at line 18 of file ItemIterator.inc.php.

Constructor & Destructor Documentation

◆ __construct()

ItemIterator::__construct ( )

Constructor

Definition at line 22 of file ItemIterator.inc.php.

Member Function Documentation

◆ atFirstPage()

ItemIterator::atFirstPage ( )

Determine whether this iterator represents the first page of a set.

Returns
boolean

Reimplemented in DAOResultFactory, VirtualArrayIterator, DBRowIterator, and ArrayItemIterator.

Definition at line 45 of file ItemIterator.inc.php.

◆ atLastPage()

ItemIterator::atLastPage ( )

Determine whether this iterator represents the last page of a set.

Returns
boolean

Reimplemented in DAOResultFactory, VirtualArrayIterator, DBRowIterator, and ArrayItemIterator.

Definition at line 53 of file ItemIterator.inc.php.

◆ eof()

ItemIterator::eof ( )

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

Returns
boolean

Reimplemented in DAOResultFactory, VirtualArrayIterator, DBRowIterator, and ArrayItemIterator.

Definition at line 85 of file ItemIterator.inc.php.

◆ getCount()

ItemIterator::getCount ( )

Get the total number of items in the set.

Returns
int

Reimplemented in DAOResultFactory, VirtualArrayIterator, DBRowIterator, and ArrayItemIterator.

Definition at line 69 of file ItemIterator.inc.php.

◆ getPage()

ItemIterator::getPage ( )

Get the page number of a set that this iterator represents.

Returns
int

Reimplemented in DAOResultFactory, VirtualArrayIterator, DBRowIterator, and ArrayItemIterator.

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

◆ getPageCount()

ItemIterator::getPageCount ( )

Get the total number of pages in the set.

Returns
int

Reimplemented in DAOResultFactory, VirtualArrayIterator, DBRowIterator, and ArrayItemIterator.

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

◆ next()

ItemIterator::next ( )

Return the next item in the iterator.

Returns
object

Reimplemented in DAOResultFactory, VirtualArrayIterator, ArrayItemIterator, and DBRowIterator.

Definition at line 29 of file ItemIterator.inc.php.

◆ nextWithKey()

ItemIterator::nextWithKey ( )

Return the next item with key.

Returns
array ($key, $value);

Reimplemented in VirtualArrayIterator, ArrayItemIterator, and DBRowIterator.

Definition at line 37 of file ItemIterator.inc.php.

◆ toArray()

ItemIterator::toArray ( )

Convert this iterator to an array.

Returns
array

Reimplemented in DAOResultFactory, DBRowIterator, VirtualArrayIterator, and ArrayItemIterator.

Definition at line 101 of file ItemIterator.inc.php.

◆ wasEmpty()

ItemIterator::wasEmpty ( )

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

Returns
boolean

Reimplemented in DAOResultFactory, DBRowIterator, VirtualArrayIterator, and ArrayItemIterator.

Definition at line 93 of file ItemIterator.inc.php.


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