BSONDocument
extends ArrayObject
in package
implements
JsonSerializable, Serializable, Unserializable
Model class for a BSON document.
The internal data will be cast to an object during BSON serialization to ensure that it becomes a BSON document.
Interfaces, Classes, Traits and Enums
- JsonSerializable
- Serializable
- Unserializable
Table of Contents
- __clone() : mixed
- Deep clone this BSONDocument.
- __construct() : mixed
- This overrides the parent constructor to allow property access of entries by default.
- __set_state() : self
- Factory method for var_export().
- bsonSerialize() : object
- Serialize the document to BSON.
- bsonUnserialize() : mixed
- Unserialize the document to BSON.
- jsonSerialize() : object
- Serialize the array to JSON.
Methods
__clone()
Deep clone this BSONDocument.
public
__clone() : mixed
Return values
mixed —__construct()
This overrides the parent constructor to allow property access of entries by default.
public
__construct([array<string|int, mixed> $input = [] ][, int $flags = ArrayObject::ARRAY_AS_PROPS ][, string $iteratorClass = 'ArrayIterator' ]) : mixed
Parameters
- $input : array<string|int, mixed> = []
- $flags : int = ArrayObject::ARRAY_AS_PROPS
- $iteratorClass : string = 'ArrayIterator'
Tags
Return values
mixed —__set_state()
Factory method for var_export().
public
static __set_state(array<string|int, mixed> $properties) : self
Parameters
- $properties : array<string|int, mixed>
Tags
Return values
self —bsonSerialize()
Serialize the document to BSON.
public
bsonSerialize() : object
Tags
Return values
object —bsonUnserialize()
Unserialize the document to BSON.
public
bsonUnserialize(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
Array data
Tags
Return values
mixed —jsonSerialize()
Serialize the array to JSON.
public
jsonSerialize() : object