php8.5
Home/ Manual/ driver / topologydescription/ MongoDB\Driver\TopologyDescription::hasReadableServer

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.

Errors/Exceptions

Source: reference/mongodb/mongodb/driver/topologydescription/hasreadableserver.xml · from the official PHP manual (php/doc-en)