Свойство | Type | Description | |
---|---|---|---|
$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). |
Méthode | Description | |
---|---|---|
__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(). |
Méthode | Description | |
---|---|---|
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 | ||
Résultat | string |
protected convertConnectTimeout ( array $options ) : array | ||
$options | array | |
Résultat | array |
protected convertWriteTimeout ( array $options ) : array | ||
$options | array | |
Résultat | array |
protected doSelectDatabase ( string $name ) : Doctrine\MongoDB\Database | ||
$name | string | |
Résultat | Doctrine\MongoDB\Database |
public dropDatabase ( string $database ) : array | ||
$database | string | |
Résultat | array |
public getConfiguration ( ) : Doctrine\MongoDB\Configuration | ||
Résultat | Doctrine\MongoDB\Configuration |
public getEventManager ( ) : Doctrine\Common\EventManager | ||
Résultat | Doctrine\Common\EventManager |
public getMongo ( ) : MongoClient | ||
Résultat | MongoClient |
public getMongoClient ( ) : MongoClient | ||
Résultat | MongoClient |
public getReadPreference ( ) : array | ||
Résultat | array |
public initialize ( ) |
public isConnected ( ) : boolean | ||
Résultat | boolean |
public listDatabases ( ) : array | ||
Résultat | array |
public selectCollection ( string $db, string $collection ) : Doctrine\MongoDB\Collection | ||
$db | string | |
$collection | string | |
Résultat | Doctrine\MongoDB\Collection |
public selectDatabase ( string $name ) : Doctrine\MongoDB\Database | ||
$name | string | |
Résultat | Doctrine\MongoDB\Database |
public setMongo ( MongoClient $mongoClient ) | ||
$mongoClient | MongoClient |
protected Configuration,Doctrine\MongoDB $config | ||
Résultat | Doctrine\MongoDB\Configuration |
protected array $driverOptions | ||
Résultat | array |
protected EventManager,Doctrine\Common $eventManager | ||
Résultat | Doctrine\Common\EventManager |
protected MongoClient $mongoClient | ||
Résultat | MongoClient |
protected array $options | ||
Résultat | array |
protected string $server | ||
Résultat | string |