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

MongoDB\Driver\TopologyDescription::getServers

PHP function Edit on GitHub ✎

(mongodb >=1.13.0)

Returns the servers in the topology

Description

MongoDB\Driver\TopologyDescription::getServers(): array

Returns an array of MongoDB\Driver\ServerDescription objects corresponding to the known servers in the topology.

Parameters Parameters

Return Values

Returns an array of MongoDB\Driver\ServerDescription objects corresponding to the known servers in the topology.

Errors/Exceptions

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