In ZF2, we have `Zend\Stdlib\ArrayUtils::iteratorToArray()`