Model class for a BSON array.
The internal data will be filtered through array_values() during BSON serialization to ensure that it becomes a BSON array.
- Full name:
\MongoDB\Model\BSONArray
- Parent class:
ArrayObject
- This class implements:
\JsonSerializable
,\MongoDB\BSON\Serializable
,\MongoDB\BSON\Unserializable
Clone this BSONArray.
public __clone(): mixed
Factory method for var_export().
public static __set_state(array $properties): self
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$properties |
array |
See Also:
Serialize the array to BSON.
public bsonSerialize(): array
The array data will be numerically reindexed to ensure that it is stored as a BSON array.
See Also:
Unserialize the document to BSON.
public bsonUnserialize(array $data): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$data |
array | Array data |
See Also:
Serialize the array to JSON.
public jsonSerialize(): array
The array data will be numerically reindexed to ensure that it is stored as a JSON array.
See Also: