Свойство | Type | Description | |
---|---|---|---|
$connection | MongoDB connection. | ||
$name | name of this database. |
Méthode | Description | |
---|---|---|
clearCollections ( ) | Clears internal collection lists. | |
createCollection ( string $name, array $options = [] ) : boolean | Creates new collection. | |
createCommand ( array $document = [] ) : |
Creates MongoDB command associated with this database. | |
dropCollection ( string $name ) : boolean | Drops specified collection. | |
getCollection ( string $name, boolean $refresh = false ) : |
Returns the Mongo collection with the given name. | |
getFileCollection ( string $prefix = 'fs', boolean $refresh = false ) : |
Returns Mongo GridFS collection with given prefix. | |
listCollections ( array $condition = [], array $options = [] ) : array | Returns the list of available collections in this database. |
Méthode | Description | |
---|---|---|
selectCollection ( string $name ) : |
Selects collection with given name. | |
selectFileCollection ( string $prefix ) : |
Selects GridFS collection with given prefix. |
public clearCollections ( ) |
public createCommand ( array $document = [] ) : |
||
$document | array | command document contents. |
Résultat | command instance. |
public dropCollection ( string $name ) : boolean | ||
$name | string | name of the collection |
Résultat | boolean | whether operation was successful. |
public getCollection ( string $name, boolean $refresh = false ) : |
||
$name | string | collection name |
$refresh | boolean | whether to reload the collection instance even if it is found in the cache. |
Résultat | Mongo collection instance. |
public getFileCollection ( string $prefix = 'fs', boolean $refresh = false ) : |
||
$prefix | string | collection prefix. |
$refresh | boolean | whether to reload the collection instance even if it is found in the cache. |
Résultat | Mongo GridFS collection. |
protected selectCollection ( string $name ) : |
||
$name | string | collection name. |
Résultat | collection instance. |
protected selectFileCollection ( string $prefix ) : |
||
$prefix | string | file collection prefix. |
Résultat | file collection instance. |