MongoDB\BSON\PackedArray::getIterator
PHP function
Edit on GitHub ✎
(mongodb >=1.16.0)
Returns an iterator for the BSON array
Description
MongoDB\BSON\PackedArray::getIterator(): MongoDB\BSON\Iterator
Parameters Parameters
Return Values
Returns a MongoDB\BSON\Iterator instance that can be used to iterate over all indexes in the array.
Errors/Exceptions
- Throws
MongoDB\Driver\Exception\UnexpectedValueExceptionif the BSON iterator could not be initialized.
See Also
- BSON Types