InfiniteArrayIterator
in package
Convenience wrapper for cyclically iterating over an array.
Is optimized for direct access (rather than with foreach).
Tags
Table of Contents
Properties
- $iter : InfiniteIterator<V, ArrayIterator<K, V>>
Methods
- __construct() : mixed
- current() : V
- getAndAdvance() : V
- Get the current element and then advance the iterator
- next() : void
Properties
$iter read-only
private
InfiniteIterator<V, ArrayIterator<K, V>>
$iter
Methods
__construct()
public
__construct(array<string|int, mixed> $arr) : mixed
Parameters
- $arr : array<string|int, mixed>
current()
public
current() : V
Return values
VgetAndAdvance()
Get the current element and then advance the iterator
public
getAndAdvance() : V
Return values
Vnext()
public
next() : void