(mongodb >=1.0.0)
MongoDB\Driver\Manager::selectServer — Select a server matching a read preference
$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.
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.
Returns an MongoDB\Driver\Server matching the read preference.