Properties

$_id

$_id : \MongoDB\BSON\ObjectId

Type

\MongoDB\BSON\ObjectId

$_defaultAllowNullValue

$_defaultAllowNullValue : boolean

Type

boolean

Methods

getDb()

getDb() : string

Gets the connection used to crud data to the model

Returns

string

setDefaultAllowNullValue()

setDefaultAllowNullValue(boolean  $allow) 

Parameters

boolean $allow

connection()

connection(mixed  $context = null) : \ManaPHP\Data\MongodbInterface

Parameters

mixed $context

=get_object_vars(new static)

Returns

\ManaPHP\Data\MongodbInterface

getPrimaryKey()

getPrimaryKey() : string

Returns

string —

=key(get_object_vars(new static))

getFields()

getFields() : array

Returns

array —

=get_object_vars(new static)

getIntFields()

getIntFields() : array

Returns

array —

=get_object_vars(new static)

getFieldTypes()

getFieldTypes() : array

bool, int, float, string, array, objectid

Returns

array —

=get_object_vars(new static)

isAllowNullValue()

isAllowNullValue() : boolean

Returns

boolean

getNextAutoIncrementId()

getNextAutoIncrementId(integer  $step = 1) : integer

Parameters

integer $step

Returns

integer

normalizeValue()

normalizeValue(string  $type, mixed  $value) : boolean|float|integer|string|array|\MongoDB\BSON\ObjectID|\MongoDB\BSON\UTCDateTime

Parameters

string $type
mixed $value

Returns

boolean|float|integer|string|array|\MongoDB\BSON\ObjectID|\MongoDB\BSON\UTCDateTime

create()

create() : static

Returns

static

update()

update() : static

Updates a model instance. If the instance does n't exist in the persistence it will throw an exception

Returns

static

aggregateEx()

aggregateEx(array  $pipeline, array  $options = array()) : array

Parameters

array $pipeline
array $options

Returns

array

normalizeDocument()

normalizeDocument(array  $document) : array

Parameters

array $document

Returns

array

bulkInsert()

bulkInsert(array<mixed,array>  $documents) : integer

Parameters

array<mixed,array> $documents

Returns

integer

bulkUpdate()

bulkUpdate(array  $documents) : integer

Parameters

array $documents

Returns

integer

bulkUpsert()

bulkUpsert(array<mixed,array>  $documents) : integer

Parameters

array<mixed,array> $documents

Returns

integer

insert()

insert(array  $document) : integer

Parameters

array $document

=get_object_vars(new static)

Returns

integer

__debugInfo()

__debugInfo() 

_createAutoIncrementIndex()

_createAutoIncrementIndex(\ManaPHP\Data\MongodbInterface  $mongodb, string  $source) : boolean

Parameters

\ManaPHP\Data\MongodbInterface $mongodb
string $source

Returns

boolean