array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'mongodb-driver-monitoring-commandstartedevent.getserver.php', 1 => 'MongoDB\\Driver\\Monitoring\\CommandStartedEvent::getServer', 2 => 'Returns the Server on which the command was executed', ), 'up' => array ( 0 => 'class.mongodb-driver-monitoring-commandstartedevent.php', 1 => 'MongoDB\\Driver\\Monitoring\\CommandStartedEvent', ), 'prev' => array ( 0 => 'mongodb-driver-monitoring-commandstartedevent.getrequestid.php', 1 => 'MongoDB\\Driver\\Monitoring\\CommandStartedEvent::getRequestId', ), 'next' => array ( 0 => 'mongodb-driver-monitoring-commandstartedevent.getserverconnectionid.php', 1 => 'MongoDB\\Driver\\Monitoring\\CommandStartedEvent::getServerConnectionId', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/mongodb/mongodb/driver/monitoring/commandstartedevent/getserver.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

MongoDB\Driver\Monitoring\CommandStartedEvent::getServer

(mongodb >=1.3.0)

MongoDB\Driver\Monitoring\CommandStartedEvent::getServerReturns 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.

说明

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

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

参数

此函数没有参数。

返回值

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

错误/异常

更新日志

版本 说明
PECL mongodb 2.0.0 此方法已被移除。

参见