php8.5
Home/ Manual/ driver / cursorinterface/ MongoDB\Driver\CursorInterface::getServer

MongoDB\Driver\CursorInterface::getServer

PHP function Edit on GitHub ✎

(mongodb >=1.6.0)

Returns the server associated with this cursor

Description

MongoDB\Driver\CursorInterface::getServer(): MongoDB\Driver\Server

Returns the MongoDB\Driver\Server associated with this cursor. This is the server that executed the MongoDB\Driver\Query or MongoDB\Driver\Command.

Parameters Parameters

Return Values

Returns the MongoDB\Driver\Server associated with this cursor.

Errors/Exceptions

See Also

  • MongoDB\Driver\Cursor::getServer
  • MongoDB\Driver\Server

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