Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-1123

Create interface for Cursor class

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.6.0, 1.6.0alpha1
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: