# MongoDB\Driver\CursorInterface::getId

(mongodb >=1.6.0)

MongoDB\Driver\CursorInterface::getId — Returns the ID for this cursor

### Description

abstract public MongoDB\Driver\CursorInterface::getId ( void ) : MongoDB\Driver\CursorId

Returns the MongoDB\Driver\CursorId associated with this cursor. A cursor ID uniquely identifies the cursor on the server.

### Parameters

This function has no parameters.

### Return Values

Returns the MongoDB\Driver\CursorId for this cursor.

### Errors/Exceptions

- Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors.

### See Also

- MongoDB\Driver\Cursor::getId() - Returns the ID for this cursor
- MongoDB\Driver\CursorId
- MongoDB\Driver\CursorId::__toString() - String representation of the cursor ID