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.
Tags
Table of Contents
Interfaces
- JsonSerializable
- Serializable
- Unserializable
Methods
- __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() : stdClass
- Serialize the document to BSON.
- bsonUnserialize() : void
- Unserialize the document to BSON.
- jsonSerialize() : stdClass
- Serialize the array to JSON.
Methods
__clone()
Deep clone this BSONDocument.
public
__clone() : mixed
__construct()
This overrides the parent constructor to allow property access of entries by default.
public
__construct([array<string, mixed>|stdClass $input = [] ][, int $flags = ArrayObject::ARRAY_AS_PROPS ][, string $iteratorClass = ArrayIterator::class ]) : mixed
Parameters
- $input : array<string, mixed>|stdClass = []
- $flags : int = ArrayObject::ARRAY_AS_PROPS
- $iteratorClass : string = ArrayIterator::class
Tags
__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
selfbsonSerialize()
Serialize the document to BSON.
public
bsonSerialize() : stdClass
Tags
Return values
stdClassbsonUnserialize()
Unserialize the document to BSON.
public
bsonUnserialize(array<string, mixed> $data) : void
Parameters
- $data : array<string, mixed>
-
Array data
Tags
jsonSerialize()
Serialize the array to JSON.
public
jsonSerialize() : stdClass