ArrayListIterator
in package
implements
Iterator
Array list iterator
Table of Contents
Interfaces
- Iterator
Properties
Methods
- __construct() : mixed
- Constructor
- current() : mixed
- Returns item on current position
- key() : int
- Returns key (index) on current position
- next() : mixed
- Returns next item and moves internal position
- rewind() : mixed
- Rewinds an iterator to the first item
- valid() : bool
- Check if the current position is valid
Properties
$_class
Iterator data
private
IteratorAggregate|null
$_class
= null
$_current
Current position
private
int
$_current
= 0
Methods
__construct()
Constructor
public
__construct([IteratorAggregate $class = null ]) : mixed
Parameters
- $class : IteratorAggregate = null
current()
Returns item on current position
public
current() : mixed
Tags
key()
Returns key (index) on current position
public
key() : int
Return values
intnext()
Returns next item and moves internal position
public
next() : mixed
Tags
rewind()
Rewinds an iterator to the first item
public
rewind() : mixed
valid()
Check if the current position is valid
public
valid() : bool