<!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 cursor to the beginning of the result set</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mongocursor.reset.html">MongoCursor::reset</a></div> <div class="next" style="text-align: right; float: right;"><a href="mongocursor.setflag.html">MongoCursor::setFlag</a></div> <div class="up"><a href="class.mongocursor.html">MongoCursor</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="mongocursor.rewind" class="refentry"> <div class="refnamediv"> <h1 class="refname">MongoCursor::rewind</h1> <p class="verinfo">(PECL mongo >=0.9.0)</p><p class="refpurpose"><span class="refname">MongoCursor::rewind</span> — <span class="dc-title">Returns the cursor to the beginning of the result set</span></p> </div> <div class="refsect1 description" id="refsect1-mongocursor.rewind-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>MongoCursor::rewind</strong></span> ( <span class="methodparam">void</span> )</div> <p class="para rdfs-comment"> This is identical to the function: </p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br /><br /></span><span style="color: #007700">public function </span><span style="color: #0000BB">rewind</span><span style="color: #007700">() {<br /> </span><span style="color: #0000BB">$this</span><span style="color: #007700">-></span><span style="color: #0000BB">reset</span><span style="color: #007700">();<br /> </span><span style="color: #0000BB">$this</span><span style="color: #007700">-></span><span style="color: #0000BB">next</span><span style="color: #007700">();<br />}<br /><br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> </div> <div class="refsect1 parameters" id="refsect1-mongocursor.rewind-parameters"> <h3 class="title">Parameters</h3> <p class="para">This function has no parameters.</p> </div> <div class="refsect1 returnvalues" id="refsect1-mongocursor.rewind-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> <strong><code>NULL</code></strong>. </p> </div> <div class="refsect1 errors" id="refsect1-mongocursor.rewind-errors"> <h3 class="title">Errors/Exceptions</h3> <p class="para"> Throws <a href="class.mongoconnectionexception.html" class="classname">MongoConnectionException</a> if it cannot reach the database and <a href="class.mongocursortimeoutexception.html" class="classname">MongoCursorTimeoutException</a> if the timeout is exceeded. </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="mongocursor.reset.html">MongoCursor::reset</a></div> <div class="next" style="text-align: right; float: right;"><a href="mongocursor.setflag.html">MongoCursor::setFlag</a></div> <div class="up"><a href="class.mongocursor.html">MongoCursor</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>