PHP Class Phalcon\Db\Adapter\MongoDB\Model\BSONDocument

The internal data will be cast to an object during BSON serialization to ensure that it becomes a BSON document.
Inheritance: extends ArrayObjec\ArrayObject, implements MongoDB\BSON\Serializable, implements MongoDB\BSON\Unserializable
Datei anzeigen Open project: phalcon/incubator

Public Methods

Method Description
__construct ( $input = [], $flags = ArrayObject::ARRAY_AS_PROPS, $iterator_class = 'ArrayIterator' ) Constructor.
__set_state ( array $properties ) : self Factory method for var_export().
bsonSerialize ( ) : object Serialize the document to BSON.
bsonUnserialize ( array $data ) Unserialize the document to BSON.

Method Details

__construct() public method

This overrides the parent constructor to allow property access of entries by default.
See also: http://php.net/arrayobject.construct
public __construct ( $input = [], $flags = ArrayObject::ARRAY_AS_PROPS, $iterator_class = 'ArrayIterator' )

__set_state() public static method

Factory method for var_export().
See also: http://php.net/oop5.magic#object.set-state
See also: http://php.net/var-export
public static __set_state ( array $properties ) : self
$properties array
return self

bsonSerialize() public method

Serialize the document to BSON.
See also: http://php.net/mongodb-bson-serializable.bsonserialize
public bsonSerialize ( ) : object
return object

bsonUnserialize() public method

Unserialize the document to BSON.
See also: http://php.net/mongodb-bson-unserializable.bsonunserialize
public bsonUnserialize ( array $data )
$data array Array data