ChunkedIterator
extends IteratorIterator
in package
Pulls out chunks from an inner iterator and yields the chunks as arrays
Table of Contents
Properties
- $chunk : array<string|int, mixed>
- $chunkSize : int
Methods
- __construct() : mixed
- current() : mixed
- next() : mixed
- rewind() : mixed
- valid() : mixed
Properties
$chunk
protected
array<string|int, mixed>
$chunk
Current chunk
$chunkSize
protected
int
$chunkSize
Size of each chunk
Methods
__construct()
public
__construct(Traversable $iterator, int $chunkSize) : mixed
Parameters
- $iterator : Traversable
-
Traversable iterator
- $chunkSize : int
-
Size to make each chunk
Tags
current()
public
current() : mixed
next()
public
next() : mixed
rewind()
public
rewind() : mixed
valid()
public
valid() : mixed