mongodb\Connection getFileCollection()

getFileCollection() public method Returns the MongoDB GridFS collection. public yii\mongodb\file\Collection getFileCollection ( $prefix = 'fs', $refresh = false )$prefix string|array Collection prefix. If string considered as the prefix of the GridFS collection inside the default database. If array - first element considered as the name of the database, second - as prefix of the GridFS collection inside that database, if no second element present default "fs" prefix will be used. $ref

mongodb\Connection getDefaultDatabaseName()

getDefaultDatabaseName() public method Returns default database name, if it is not set, attempts to determine it from $dsn value. public string getDefaultDatabaseName ( )return string Default database name throws yii\base\InvalidConfigException if unable to determine default database name.

mongodb\Connection getDatabase()

getDatabase() public method Returns the MongoDB database with the given name. public yii\mongodb\Database getDatabase ( $name = null, $refresh = false )$name string|null Database name, if null default one will be used. $refresh boolean Whether to reestablish the database connection even, if it is found in the cache. return yii\mongodb\Database Database instance.

mongodb\Connection getCollection()

getCollection() public method Returns the MongoDB collection with the given name. public yii\mongodb\Collection getCollection ( $name, $refresh = false )$name string|array Collection name. If string considered as the name of the collection inside the default database. If array - first element considered as the name of the database, second - as name of collection inside that database $refresh boolean Whether to reload the collection instance even if it is found in the cache. return y

mongodb\Connection EVENT_AFTER_OPEN

EVENT_AFTER_OPEN event of type \yii\mongodb\Event An event that is triggered after a DB connection is established

mongodb\Connection createCommand()

createCommand() public method (available since version 2.1) Creates MongoDB command. public yii\mongodb\Command createCommand ( $document = [], $databaseName = null )$document array Command document contents. $databaseName string|null Database name, if not set $defaultDatabaseName will be used. return yii\mongodb\Command Command instance.

mongodb\Connection close()

close() public method Closes the currently active DB connection. It does nothing if the connection is already closed. public void close ( )

mongodb\Connection $typeMap

$typeMap public property (available since version 2.1) Type map to use for BSON unserialization. Note: default type map will be automatically merged into this field, possibly overriding user-defined values. See also http://php.net/manual/en/mongodb-driver-cursor.settypemap.php. public array $typeMap = []

mongodb\Connection $queryBuilder

$queryBuilder public property The query builder for the this MongoDB connection. public yii\mongodb\QueryBuilder getQueryBuilder ( )public void setQueryBuilder ( $queryBuilder )

mongodb\Connection $options

$options public property Connection options. For example: [ 'socketTimeoutMS' => 1000, // how long a send or receive on a socket can take before timing out 'ssl' => true // initiate the connection with TLS/SSL ] See also https://docs.mongodb.com/manual/reference/connection-string/#connections-connection-options. public array $options = []