PHP Manual

  • English French German Portuguese Spanish
PHP Manual Function Reference Database Extensions Vendor Specific Database Extensions Mongo Core Classes MongoCursor MongoCursor::rewind
MongoCursor MongoCursor::addOption MongoCursor::awaitData MongoCursor::batchSize MongoCursor::__construct MongoCursor::count MongoCursor::current MongoCursor::dead MongoCursor::doQuery MongoCursor::explain MongoCursor::fields MongoCursor::getNext MongoCursor::getReadPreference MongoCursor::hasNext MongoCursor::hint MongoCursor::immortal MongoCursor::info MongoCursor::key MongoCursor::limit MongoCursor::maxTimeMS MongoCursor::next MongoCursor::partial MongoCursor::reset MongoCursor::rewind MongoCursor::setFlag MongoCursor::setReadPreference MongoCursor::skip MongoCursor::slaveOkay MongoCursor::snapshot MongoCursor::sort MongoCursor::tailable MongoCursor::timeout MongoCursor::valid
  • MongoCursor::reset
  • MongoCursor::setFlag

MongoCursor::rewind

(PECL mongo >=0.9.0)

MongoCursor::rewind — Returns the cursor to the beginning of the result set

Description

public void MongoCursor::rewind ( void )

This is identical to the function:

<?php

public function rewind() {
    
$this->reset();
    
$this->next();
}

?>

Parameters

This function has no parameters.

Return Values

NULL.

Errors/Exceptions

Throws MongoConnectionException if it cannot reach the database and MongoCursorTimeoutException if the timeout is exceeded.

See Also

  • Iterator::rewind() - Rewind the Iterator to the first element
© Copyright © 2001-2015 The PHP Group.

© Copyright 2014. Diseñado por PHP Manual usando jfCMS.