-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 1.4.0
-
Component/s: None
-
None
mongodb/mongo-php-driver#754 presents a use case where a CursorInterface would come in handy.
Users cannot extend a Cursor because (a) it's final and (b) it is Traversable but not an Iterator, so there are no methods to access its elements. While wrapping the Cursor with IteratorIterator is the preferred approach, the absence of an interface means that users cannot pass around that IteratorIterator wherever a Cursor is expected. An interface could address that.
- is related to
-
PHPC-378 Create interfaces for driver classes
- Closed
- related to
-
PHPC-1279 Improve documentation for Cursor::isDead()
- Closed
-
PHPLIB-1114 Replace Cursor type hints with CursorInterface
- Closed
- links to