MongoDB\Driver\Manager
PHP Manual

MongoDB\Driver\Manager::selectServer

(mongodb >=1.0.0)

MongoDB\Driver\Manager::selectServerSelect a server matching a read preference

Açıklama

final public MongoDB\Driver\Server MongoDB\Driver\Manager::selectServer ( MongoDB\Driver\ReadPreference $readPreference )

Selects a MongoDB\Driver\Server matching readPreference. This may be used to preselect a server in order to perform version checking before executing an operation.

Değiştirgeler

readPreference

Optionally, a MongoDB\Driver\ReadPreference to route the command to. If none given, defaults to the Read Preferences set by the MongoDB Connection URI.

Dönen Değerler

Returns an MongoDB\Driver\Server matching the read preference.

Hatalar/İstisnalar

Ayrıca Bakınız


MongoDB\Driver\Manager
PHP Manual