interface Persistable implements Unserializable, Serializable (View source)

Classes may implement this interface to take advantage of automatic ODM (object document mapping) behavior in the driver.

Methods

void
bsonUnserialize(array $data)

Constructs the object from a BSON array or document Called during unserialization of the object from BSON.

PackedArray
bsonSerialize()

No description

Details

void bsonUnserialize(array $data)

Constructs the object from a BSON array or document Called during unserialization of the object from BSON.

The properties of the BSON array or document will be passed to the method as an array.

Parameters

array $data

Properties within the BSON array or document.

Return Value

void

PackedArray bsonSerialize()

Since: 1.17.0

No description

Return Value

PackedArray