Documentation

MapIterator extends IteratorIterator
in package

Maps values before yielding

Table of Contents

Properties

$callback  : mixed

Methods

__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


        
On this page

Search results