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