PHP Class Mongolid\Connection\Connection

Afficher le fichier Open project: leroy-merlin-br/mongolid Class Usage Examples

Méthodes publiques

Свойство Type Description
$defaultDatabase string The default database where mongolid will store the documents.

Protected Properties

Свойство 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.

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
findDefaultDatabase ( string $connectionString ) : void Find and stores the default database in the connection string.

Method Details

__construct() public méthode

Constructs a new Mongolid connection. It uses the same constructor parameters as the original MongoDB\Client constructor.
See also: http://php.net/manual/en/mongodb-driver-manager.construct.php
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.

findDefaultDatabase() protected méthode

Find and stores the default database in the connection string.
protected findDefaultDatabase ( string $connectionString ) : void
$connectionString string MongoDB connection string.
Résultat void

getRawConnection() public méthode

Getter for Client instance.
public getRawConnection ( ) : MongoDB\Client
Résultat MongoDB\Client

getRawManager() public méthode

Getter for Manager instance.
public getRawManager ( ) : MongoDB\Driver\Manager
Résultat MongoDB\Driver\Manager

Property Details

$defaultDatabase public_oe property

The default database where mongolid will store the documents.
public string $defaultDatabase
Résultat string

$rawConnection protected_oe property

The raw MongoDB\Client object that represents this connection.
protected Client,MongoDB $rawConnection
Résultat MongoDB\Client

$rawManager protected_oe property

The raw MongoDB\Manager object to perform bulk operations.
protected Client,MongoDB $rawManager
Résultat MongoDB\Client