MongoDB\Driver\TopologyDescription::hasReadableServer
PHP function
Edit on GitHub ✎
(mongodb >=1.13.0)
Returns whether the topology has a readable server
Description
MongoDB\Driver\TopologyDescription::hasReadableServer(MongoDB\Driver\ReadPreference|null $readPreference = null): bool
Returns whether the topology has a readable server or, if readPreference is specified, a server matching the specified read preference.
Parameters Parameters
Return Values
Returns whether the topology has a readable server or, if readPreference is specified, a server matching the specified read preference.