php8.5
Home/ Manual/ monitoring / commandstartedevent/ MongoDB\Driver\Monitoring\CommandStartedEvent::getServer

MongoDB\Driver\Monitoring\CommandStartedEvent::getServer

PHP function Deprecated as of mongodb 1.20.0 Edit on GitHub ✎

(mongodb >=1.3.0)

Returns the Server on which the command was executed

This method has been DEPRECATED as of extension version 1.20.0 and was removed in 2.0. Applications should use MongoDB\Driver\Monitoring\CommandStartedEvent::getHost and MongoDB\Driver\Monitoring\CommandStartedEvent::getPort instead.

Description

MongoDB\Driver\Monitoring\CommandStartedEvent::getServer(): MongoDB\Driver\Server

Returns the MongoDB\Driver\Server on which the command was executed.

Parameters Parameters

Return Values

Returns the MongoDB\Driver\Server on which the command was executed.

Errors/Exceptions

Changelog

VersionDescription

See Also

  • MongoDB\Driver\Monitoring\CommandFailedEvent::getServer
  • MongoDB\Driver\Monitoring\CommandSucceededEvent::getServer
  • mongodb.tutorial.apm

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