Property | Type | Description | |
---|---|---|---|
$defaultDatabase | string | The default database where mongolid will store the documents. |
Property | Type | Description | |
---|---|---|---|
$rawConnection | MongoDB\Client | The raw MongoDB\Client object that represents this connection. | |
$rawManager | MongoDB\Client | The raw MongoDB\Manager object to perform bulk operations. |
Method | Description | |
---|---|---|
__construct ( string $server = 'mongodb://localhost:27017', array $options = ['connect' => true], array $driver_options = [] ) | Constructs a new Mongolid connection. It uses the same constructor parameters as the original MongoDB\Client constructor. | |
getRawConnection ( ) : MongoDB\Client | Getter for Client instance. | |
getRawManager ( ) : MongoDB\Driver\Manager | Getter for Manager instance. |
Method | Description | |
---|---|---|
findDefaultDatabase ( string $connectionString ) : void | Find and stores the default database in the connection string. |
public __construct ( string $server = 'mongodb://localhost:27017', array $options = ['connect' => true], array $driver_options = [] ) | ||
$server | string | The specified connection string. |
$options | array | The mongodb client options. |
$driver_options | array | The mongodb driver options when opening a connection. |
protected findDefaultDatabase ( string $connectionString ) : void | ||
$connectionString | string | MongoDB connection string. |
return | void |
public getRawConnection ( ) : MongoDB\Client | ||
return | MongoDB\Client |
public getRawManager ( ) : MongoDB\Driver\Manager | ||
return | MongoDB\Driver\Manager |
public string $defaultDatabase | ||
return | string |
protected Client,MongoDB $rawConnection | ||
return | MongoDB\Client |