Свойство | Тип | Описание | |
---|---|---|---|
$config | Doctrine\MongoDB\Configuration | The Configuration for this connection. | |
$driverOptions | array | Driver options used to construct the MongoClient instance (optional). | |
$eventManager | Doctrine\Common\EventManager | The EventManager used to dispatch events. | |
$mongoClient | MongoClient | The PHP MongoClient instance being wrapped. | |
$options | array | Options used to construct the MongoClient instance (optional). | |
$server | string | Server string used to construct the MongoClient instance (optional). |
Метод | Описание | |
---|---|---|
__construct ( string | MongoClient $server = null, array $options = [], Doctrine\MongoDB\Configuration $config = null, Doctrine\Common\EventManager $evm = null, array $driverOptions = [] ) | Constructor. | |
__get ( string $database ) : MongoDB | Wrapper method for MongoClient::__get(). | |
__toString ( ) : string | Wrapper method for MongoClient::__toString(). | |
close ( ) : boolean | Wrapper method for MongoClient::close(). | |
connect ( ) : boolean | Wrapper method for MongoClient::connect(). | |
dropDatabase ( string $database ) : array | Wrapper method for MongoClient::dropDB(). | |
getConfiguration ( ) : Doctrine\MongoDB\Configuration | Get the Configuration used by this Connection. | |
getEventManager ( ) : Doctrine\Common\EventManager | Get the EventManager used by this Connection. | |
getMongo ( ) : MongoClient | Get the MongoClient instance being wrapped. | |
getMongoClient ( ) : MongoClient | Get the MongoClient instance being wrapped. | |
getReadPreference ( ) : array | Wrapper method for MongoClient::getReadPreference(). | |
getServer ( ) : string | null | Get the server string. | |
getStatus ( ) : string | Gets the $status property of the wrapped MongoClient instance. | |
initialize ( ) | Construct the wrapped MongoClient instance if necessary. | |
isConnected ( ) : boolean | Checks whether the connection is initialized and connected. | |
listDatabases ( ) : array | Wrapper method for MongoClient::listDBs(). | |
log ( array $log ) | Log something using the configured logger callable (if available). | |
selectCollection ( string $db, string $collection ) : Doctrine\MongoDB\Collection | Wrapper method for MongoClient::selectCollection(). | |
selectDatabase ( string $name ) : Doctrine\MongoDB\Database | Wrapper method for MongoClient::selectDatabase(). | |
setMongo ( MongoClient $mongoClient ) | Set the MongoClient instance to wrap. | |
setReadPreference ( string $readPreference, array $tags = null ) : boolean | Wrapper method for MongoClient::setReadPreference(). |
Метод | Описание | |
---|---|---|
convertConnectTimeout ( array $options ) : array | Converts "timeout" MongoClient constructor option to "connectTimeoutMS" for driver versions 1.4.0+. | |
convertWriteTimeout ( array $options ) : array | Converts "wTimeout" MongoClient constructor option to "wTimeoutMS" for driver versions 1.4.0+. | |
doSelectDatabase ( string $name ) : Doctrine\MongoDB\Database | Return a new Database instance. | |
retry ( Closure $retry ) : mixed | Conditionally retry a closure if it yields an exception. |
public __construct ( string | MongoClient $server = null, array $options = [], Doctrine\MongoDB\Configuration $config = null, Doctrine\Common\EventManager $evm = null, array $driverOptions = [] ) | ||
$server | string | MongoClient | Server string or MongoClient instance |
$options | array | MongoClient constructor options |
$config | Doctrine\MongoDB\Configuration | Configuration instance |
$evm | Doctrine\Common\EventManager | EventManager instance |
$driverOptions | array | MongoClient constructor options |
public __toString ( ) : string | ||
Результат | string |
protected convertConnectTimeout ( array $options ) : array | ||
$options | array | |
Результат | array |
protected convertWriteTimeout ( array $options ) : array | ||
$options | array | |
Результат | array |
protected doSelectDatabase ( string $name ) : Doctrine\MongoDB\Database | ||
$name | string | |
Результат | Doctrine\MongoDB\Database |
public dropDatabase ( string $database ) : array | ||
$database | string | |
Результат | array |
public getConfiguration ( ) : Doctrine\MongoDB\Configuration | ||
Результат | Doctrine\MongoDB\Configuration |
public getEventManager ( ) : Doctrine\Common\EventManager | ||
Результат | Doctrine\Common\EventManager |
public getMongo ( ) : MongoClient | ||
Результат | MongoClient |
public getMongoClient ( ) : MongoClient | ||
Результат | MongoClient |
public getReadPreference ( ) : array | ||
Результат | array |
public initialize ( ) |
public isConnected ( ) : boolean | ||
Результат | boolean |
public listDatabases ( ) : array | ||
Результат | array |
public selectCollection ( string $db, string $collection ) : Doctrine\MongoDB\Collection | ||
$db | string | |
$collection | string | |
Результат | Doctrine\MongoDB\Collection |
public selectDatabase ( string $name ) : Doctrine\MongoDB\Database | ||
$name | string | |
Результат | Doctrine\MongoDB\Database |
public setMongo ( MongoClient $mongoClient ) | ||
$mongoClient | MongoClient |
protected Configuration,Doctrine\MongoDB $config | ||
Результат | Doctrine\MongoDB\Configuration |
protected array $driverOptions | ||
Результат | array |
protected EventManager,Doctrine\Common $eventManager | ||
Результат | Doctrine\Common\EventManager |
protected MongoClient $mongoClient | ||
Результат | MongoClient |
protected array $options | ||
Результат | array |
protected string $server | ||
Результат | string |