public function setMap($map)
{
if (!is_array($map) && !$map instanceof Traversable) {
throw new Exception\InvalidArgumentException(sprintf('%s: expects an array or Traversable, received "%s"', __METHOD__, is_object($map) ? get_class($map) : gettype($map)));
}
if ($map instanceof Traversable) {
$map = ArrayUtils::iteratorToArray($map);
}
$this->map = $map;
}