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

Consolidate Result and Cursor into a single, Traversable Cursor class

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.4.0
    • Affects Version/s: 0.3.1
    • Component/s: None
    • Labels:
      None

      Here's the deal:

      • The current Cursor class and its Iterator implementation can be deleted
      • Copy over the isDead() implementation over to Result
      • Result can simply be Traversable
        • IteratorAggregate was only used because we were going to support custom iterator classes (but no longer as of PHPC-214)
        • Internal classes can implement Travserable by having a get_iterator() handler. Down the line, a mongofill or userland clone of Phongo can simply implement Iterator or IteratorAggregate as needed to still work with PHPLIB.
      • Result can now be renamed to Cursor (we still want that name)

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: