<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Returns the Server on which the command was executed</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mongodb-driver-monitoring-commandsucceededevent.getrequestid.html">MongoDB\Driver\Monitoring\CommandSucceededEvent::getRequestId</a></div> <div class="next" style="text-align: right; float: right;"><a href="class.mongodb-driver-monitoring-commandsubscriber.html">MongoDB\Driver\Monitoring\CommandSubscriber</a></div> <div class="up"><a href="class.mongodb-driver-monitoring-commandsucceededevent.html">MongoDB\Driver\Monitoring\CommandSucceededEvent</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="mongodb-driver-monitoring-commandsucceededevent.getserver" class="refentry"> <div class="refnamediv"> <h1 class="refname">MongoDB\Driver\Monitoring\CommandSucceededEvent::getServer</h1> <p class="verinfo">(mongodb >=1.3.0)</p><p class="refpurpose"><span class="refname">MongoDB\Driver\Monitoring\CommandSucceededEvent::getServer</span> — <span class="dc-title">Returns the Server on which the command was executed</span></p> </div> <div class="refsect1 description" id="refsect1-mongodb-driver-monitoring-commandsucceededevent.getserver-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">final</span> <span class="modifier">public</span> <span class="type"><span class="type MongoDB\Driver\Server">MongoDB\Driver\Server</span></span> <span class="methodname"><strong>MongoDB\Driver\Monitoring\CommandSucceededEvent::getServer</strong></span> ( <span class="methodparam">void</span> )</div> <p class="para rdfs-comment"> Returns the <a href="class.mongodb-driver-server.html" class="classname">MongoDB\Driver\Server</a> on which the command was executed. </p> </div> <div class="refsect1 parameters" id="refsect1-mongodb-driver-monitoring-commandsucceededevent.getserver-parameters"> <h3 class="title">Parameters</h3> <p class="para">This function has no parameters.</p> </div> <div class="refsect1 returnvalues" id="refsect1-mongodb-driver-monitoring-commandsucceededevent.getserver-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns the <a href="class.mongodb-driver-server.html" class="classname">MongoDB\Driver\Server</a> on which the command was executed. </p> </div> <div class="refsect1 errors" id="refsect1-mongodb-driver-monitoring-commandsucceededevent.getserver-errors"> <h3 class="title">Errors/Exceptions</h3> <ul class="simplelist"> <li class="member">Throws <a href="class.mongodb-driver-exception-invalidargumentexception.html" class="classname">MongoDB\Driver\Exception\InvalidArgumentException</a> on argument parsing errors.</li> </ul> </div> <div class="refsect1 seealso" id="refsect1-mongodb-driver-monitoring-commandsucceededevent.getserver-seealso"> <h3 class="title">See Also</h3> <ul class="simplelist"> <li class="member"><span class="methodname"><a href="mongodb-driver-monitoring-commandstartedevent.getserver.html" class="methodname" rel="rdfs-seeAlso">MongoDB\Driver\Monitoring\CommandStartedEvent::getServer()</a> - Returns the Server on which the command was executed</span></li> <li class="member"><span class="methodname"><a href="mongodb-driver-cursor.getserver.html" class="methodname" rel="rdfs-seeAlso">MongoDB\Driver\Cursor::getServer()</a> - Returns the server associated with this cursor</span></li> <li class="member"><span class="methodname"><a href="mongodb-driver-writeresult.getserver.html" class="methodname" rel="rdfs-seeAlso">MongoDB\Driver\WriteResult::getServer()</a> - Returns the server associated with this write result</span></li> <li class="member"><a href="mongodb.tutorial.apm.html" class="xref">Application Performance Monitoring (APM)</a></li> </ul> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mongodb-driver-monitoring-commandsucceededevent.getrequestid.html">MongoDB\Driver\Monitoring\CommandSucceededEvent::getRequestId</a></div> <div class="next" style="text-align: right; float: right;"><a href="class.mongodb-driver-monitoring-commandsubscriber.html">MongoDB\Driver\Monitoring\CommandSubscriber</a></div> <div class="up"><a href="class.mongodb-driver-monitoring-commandsucceededevent.html">MongoDB\Driver\Monitoring\CommandSucceededEvent</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>