php8.5
Home/ Manual/ driver / cursor/ MongoDB\Driver\Cursor::rewind

MongoDB\Driver\Cursor::rewind

PHP function Edit on GitHub ✎

(mongodb >=1.9.0)

Rewind the cursor to the first result

Description

MongoDB\Driver\Cursor::rewind(): void

If the cursor has advanced beyond its first position, it can no longer be rewound.

Parameters Parameters

Return Values

null.

Errors/Exceptions

  • Throws MongoDB\Driver\Exception\LogicException if this method is called after the cursor has advanced beyond its first position.

See Also

  • Iterator::rewind

Source: reference/mongodb/mongodb/driver/cursor/rewind.xml · from the official PHP manual (php/doc-en)