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

Support custom iterators for Result

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • 0.4.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      QueryResult and CommandResult custom iterators not yet implemented. setIteratorClass(), setIteratorInitCallback(), and getIterator() should throw a "not implemented" exception for now.

      Currently, these result objects use phongo_result_get_iterator() to return a zend_object_iterator, which is not a real object; however, it does work with language constructs (e.g. foreach)) and methods such as iterator_to_array().

      Once an actual iterator class is supported (including a default implementation), getIterator() should return an actual PHP object instead of a zend_object_iterator.

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

              Created:
              Updated:
              Resolved: