<!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 cluster time for this session</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mongodb-driver-session.endsession.html">MongoDB\Driver\Session::endSession</a></div> <div class="next" style="text-align: right; float: right;"><a href="mongodb-driver-session.getlogicalsessionid.html">MongoDB\Driver\Session::getLogicalSessionId</a></div> <div class="up"><a href="class.mongodb-driver-session.html">MongoDB\Driver\Session</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="mongodb-driver-session.getclustertime" class="refentry"> <div class="refnamediv"> <h1 class="refname">MongoDB\Driver\Session::getClusterTime</h1> <p class="verinfo">(mongodb >=1.4.0)</p><p class="refpurpose"><span class="refname">MongoDB\Driver\Session::getClusterTime</span> — <span class="dc-title">Returns the cluster time for this session</span></p> </div> <div class="refsect1 description" id="refsect1-mongodb-driver-session.getclustertime-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 object|null">object|null</span></span> <span class="methodname"><strong>MongoDB\Driver\Session::getClusterTime</strong></span> ( <span class="methodparam">void</span> )</div> <p class="para rdfs-comment"> Returns the cluster time for this session. If the session has not been used for any operation and <span class="methodname"><a href="mongodb-driver-session.advanceclustertime.html" class="methodname">MongoDB\Driver\Session::advanceClusterTime()</a></span> has not been called, the cluster time will be <strong><code>NULL</code></strong>. </p> </div> <div class="refsect1 parameters" id="refsect1-mongodb-driver-session.getclustertime-parameters"> <h3 class="title">Parameters</h3> <p class="para">This function has no parameters.</p> </div> <div class="refsect1 returnvalues" id="refsect1-mongodb-driver-session.getclustertime-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns the cluster time for this session, or <strong><code>NULL</code></strong> if the session has no cluster time. </p> </div> <div class="refsect1 errors" id="refsect1-mongodb-driver-session.getclustertime-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-session.getclustertime-seealso"> <h3 class="title">See Also</h3> <ul class="simplelist"> <li class="member"><span class="methodname"><a href="mongodb-driver-session.advanceclustertime.html" class="methodname" rel="rdfs-seeAlso">MongoDB\Driver\Session::advanceClusterTime()</a> - Advances the cluster time for this session</span></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-session.endsession.html">MongoDB\Driver\Session::endSession</a></div> <div class="next" style="text-align: right; float: right;"><a href="mongodb-driver-session.getlogicalsessionid.html">MongoDB\Driver\Session::getLogicalSessionId</a></div> <div class="up"><a href="class.mongodb-driver-session.html">MongoDB\Driver\Session</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>