Documentation

MapIterator extends IteratorIterator
in package

Maps values before yielding

Table of Contents

$callback  : mixed
__construct()  : mixed
current()  : mixed

Properties

Methods

__construct()

public __construct(Traversable $iterator, array<string|int, mixed>|Closure $callback) : mixed
Parameters
$iterator : Traversable

Traversable iterator

$callback : array<string|int, mixed>|Closure

Callback used for iterating

Tags
throws
InvalidArgumentException

if the callback if not callable

Return values
mixed

current()

public current() : mixed
Return values
mixed

Search results