Moodle PHP Documentation 4.1
Moodle 4.1.19+ (Build: 20250706) (3342f23b299)
MongoDB\Model\BSONDocument Class Reference
Inheritance diagram for MongoDB\Model\BSONDocument:

Public Member Functions

 __construct (array $input=[], int $flags=ArrayObject::ARRAY_AS_PROPS, string $iteratorClass='ArrayIterator')
 This overrides the parent constructor to allow property access of entries by default.
 
 __clone ()
 Deep clone this BSONDocument.
 
 bsonSerialize ()
 Serialize the document to BSON.
 
 bsonUnserialize (array $data)
 Unserialize the document to BSON.
 
 jsonSerialize ()
 Serialize the array to JSON.
 

Static Public Member Functions

static __set_state (array $properties)
 Factory method for var_export().
 

Constructor & Destructor Documentation

◆ __construct()

MongoDB\Model\BSONDocument::__construct ( array $input = [],
int $flags = ArrayObject::ARRAY_AS_PROPS,
string $iteratorClass = 'ArrayIterator' )

This overrides the parent constructor to allow property access of entries by default.

See also
https://php.net/arrayobject.construct

Member Function Documentation

◆ __set_state()

static MongoDB\Model\BSONDocument::__set_state ( array $properties)
static

Factory method for var_export().

See also
https://php.net/oop5.magic#object.set-state
https://php.net/var-export
Return values
self

◆ bsonSerialize()

MongoDB\Model\BSONDocument::bsonSerialize ( )

Serialize the document to BSON.

See also
https://php.net/mongodb-bson-serializable.bsonserialize
Return values
object

◆ bsonUnserialize()

MongoDB\Model\BSONDocument::bsonUnserialize ( array $data)

Unserialize the document to BSON.

See also
https://php.net/mongodb-bson-unserializable.bsonunserialize
Parameters
array$dataArray data

◆ jsonSerialize()

MongoDB\Model\BSONDocument::jsonSerialize ( )

Serialize the array to JSON.

See also
https://php.net/jsonserializable.jsonserialize
Return values
object

The documentation for this class was generated from the following file: