PHP Класс Mongolid\Connection\Connection

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$defaultDatabase string The default database where mongolid will store the documents.

Защищенные свойства (Protected)

Свойство Тип Описание
$rawConnection MongoDB\Client The raw MongoDB\Client object that represents this connection.
$rawManager MongoDB\Client The raw MongoDB\Manager object to perform bulk operations.

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
findDefaultDatabase ( string $connectionString ) : void Find and stores the default database in the connection string.

Описание методов

__construct() публичный метод

Constructs a new Mongolid connection. It uses the same constructor parameters as the original MongoDB\Client constructor.
См. также: 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() защищенный метод

Find and stores the default database in the connection string.
protected findDefaultDatabase ( string $connectionString ) : void
$connectionString string MongoDB connection string.
Результат void

getRawConnection() публичный метод

Getter for Client instance.
public getRawConnection ( ) : MongoDB\Client
Результат MongoDB\Client

getRawManager() публичный метод

Getter for Manager instance.
public getRawManager ( ) : MongoDB\Driver\Manager
Результат MongoDB\Driver\Manager

Описание свойств

$defaultDatabase публичное свойство

The default database where mongolid will store the documents.
public string $defaultDatabase
Результат string

$rawConnection защищенное свойство

The raw MongoDB\Client object that represents this connection.
protected Client,MongoDB $rawConnection
Результат MongoDB\Client

$rawManager защищенное свойство

The raw MongoDB\Manager object to perform bulk operations.
protected Client,MongoDB $rawManager
Результат MongoDB\Client