PHP Manual
Function Reference
Database Extensions
Vendor Specific Database Extensions
MongoDB
MongoDB\BSON
Functions
MongoDB\BSON\Document
MongoDB\BSON\PackedArray
MongoDB\BSON\Iterator
MongoDB\BSON\Binary
MongoDB\BSON\Decimal128
MongoDB\BSON\Javascript
MongoDB\BSON\MaxKey
MongoDB\BSON\MinKey
MongoDB\BSON\ObjectId
MongoDB\BSON\Regex
MongoDB\BSON\Timestamp
MongoDB\BSON\UTCDateTime
MongoDB\BSON\Type
MongoDB\BSON\Persistable
MongoDB\BSON\Serializable
MongoDB\BSON\Unserializable
MongoDB\BSON\BinaryInterface
MongoDB\BSON\Decimal128Interface
MongoDB\BSON\JavascriptInterface
MongoDB\BSON\MaxKeyInterface
MongoDB\BSON\MinKeyInterface
MongoDB\BSON\ObjectIdInterface
MongoDB\BSON\RegexInterface
MongoDB\BSON\TimestampInterface
MongoDB\BSON\UTCDateTimeInterface
MongoDB\BSON\DBPointer
MongoDB\BSON\Int64
MongoDB\BSON\Symbol
MongoDB\BSON\Undefined
MongoDB\BSON\PackedArray::unserialize
MongoDB\BSON\Iterator::__construct
MongoDB\BSON
PHP Manual
The MongoDB\BSON\Iterator class
Introduction
Iterator used to iterate a BSON document or array.
Class synopsis
MongoDB\BSON\Iterator
final
class
MongoDB\BSON\Iterator
implements
Iterator
{
/* Methods */
final
private
__construct
()
public
mixed
current
()
public
string
int
key
()
public
void
next
()
public
void
rewind
()
public
bool
valid
()
}
Table of Contents
MongoDB\BSON\Iterator::__construct
— Construct a new BSON iterator (unused)
MongoDB\BSON\Iterator::current
— Returns the current element
MongoDB\BSON\Iterator::key
— Returns the key of the current element
MongoDB\BSON\Iterator::next
— Advances the iterator to next element
MongoDB\BSON\Iterator::rewind
— Rewinds the Iterator to the first element
MongoDB\BSON\Iterator::valid
— Checks if current position is valid