« IteratorAggregate::getIterator
InternalIterator::__construct »
PHP Manual
Predefined Interfaces and Classes
The InternalIterator class
The InternalIterator class
(PHP 8)
Introduction
Class to ease implementing
IteratorAggregate
for
internal
classes.
Class synopsis
final
class
InternalIterator
implements
Iterator
{
/* Methods */
private
__construct
()
public
current
():
mixed
public
key
():
mixed
public
next
():
void
public
rewind
():
void
public
valid
():
bool
}
Table of Contents
InternalIterator::__construct
— Private constructor to disallow direct instantiation
InternalIterator::current
— Return the current element
InternalIterator::key
— Return the key of the current element
InternalIterator::next
— Move forward to next element
InternalIterator::rewind
— Rewind the Iterator to the first element
InternalIterator::valid
— Check if current position is valid