private function getIterator($value)
    {
        if ($value instanceof \Iterator) {

            return $value;
        }

        if (is_array($value)) {

            return new \ArrayIterator($value);
        }

        return new \ArrayIterator([$value]);
    }