NOTE: For Version 3 of the AWS SDK for PHP, please see the V3 User Guide and V3 API Reference.

# Class MapIterator

Maps values before yielding

  IteratorIterator implements Iterator, Traversable, OuterIterator
  Guzzle\Iterator\MapIterator

Namespace: Guzzle\Iterator
Located at Guzzle/Iterator/MapIterator.php

## Methods summary

- `public` `__construct ( Traversable $iterator, array|\Closure $callback )`
- `public` `current ( )`

## Methods detail

# `public`
`__construct( `Traversable` $iterator, array|`Closure` $callback )`

#### Parameters

$iterator
  ``Traversable``
  $iterator Traversable iterator
$callback
  `array|`Closure``
  $callback Callback used for iterating

#### Throws

``Guzzle\Common\Exception\InvalidArgumentException``
if the callback if not callable

#### Overrides

`IteratorIterator::__construct`
# `public`
`current( )`

#### Overrides

`IteratorIterator::current`

### Methods inherited from IteratorIterator

`getInnerIterator()`, `key()`, `next()`, `rewind()`, `valid()`

### Magic methods summary

## Properties summary

`protected mixed` | $callback | # Callback