array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'mongodb-driver-monitoring-commandstartedevent.getserviceid.php', 1 => 'MongoDB\\Driver\\Monitoring\\CommandStartedEvent::getServiceId', 2 => 'Returns the load balancer service ID for the command', ), 'up' => array ( 0 => 'class.mongodb-driver-monitoring-commandstartedevent.php', 1 => 'MongoDB\\Driver\\Monitoring\\CommandStartedEvent', ), 'prev' => array ( 0 => 'mongodb-driver-monitoring-commandstartedevent.getserverconnectionid.php', 1 => 'MongoDB\\Driver\\Monitoring\\CommandStartedEvent::getServerConnectionId', ), 'next' => array ( 0 => 'class.mongodb-driver-monitoring-commandsucceededevent.php', 1 => 'MongoDB\\Driver\\Monitoring\\CommandSucceededEvent', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/mongodb/mongodb/driver/monitoring/commandstartedevent/getserviceid.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

MongoDB\Driver\Monitoring\CommandStartedEvent::getServiceId

(mongodb >=1.11.0)

MongoDB\Driver\Monitoring\CommandStartedEvent::getServiceIdReturns the load balancer service ID for the command

Descrizione

final public MongoDB\Driver\Monitoring\CommandStartedEvent::getServiceId(): ?MongoDB\BSON\ObjectId

When the driver is connected to a MongoDB cluster through a load balancer, the service ID corresponds to the serviceId field in the hello command response.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Returns the load balancer service ID, or null if the driver is not connected to a load balancer.

Errori/Eccezioni