Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-1801

Update ReportType interface to support returning Iterator

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      The ReportType interface, used in generating reports, should return an implementation of Iterator (currently documented as PDOStatement). This isn't a problem since PDOStatement implements Iterator.

      Additionally, the ReportManager, which uses reports of the ReportType interface must be updated to iterate using foreach instead of while, with no PDOStatment specific method calls, and support returning an Iterator object instead of PDOStatement.

      This will allow reports to be generated using any iteratable object, whether they be PDOStatement or ArrayObject, etc. This vastly improves the capabilities of the report system.

      To recap:

      1. Update ReportType interface doc to use Iterator instead of PDOStatement
      2. Update ReportManager::fetchAll doc to use Iterator instead of PDOStatement
      3. Update ReportManager::fetchAll to use foreach instead of while

        Activity

        cody Cody Phillips (Inactive) created issue -
        cody Cody Phillips (Inactive) made changes -
        Field Original Value New Value
        Sprint 3.6.0 Sprint 2 [ 16 ]
        cody Cody Phillips (Inactive) made changes -
        Rank Ranked higher
        cody Cody Phillips (Inactive) made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        cody Cody Phillips (Inactive) made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        tyson Tyson Phillips (Inactive) made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            cody Cody Phillips (Inactive)
            Reporter:
            cody Cody Phillips (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              28/Sep/15

              Agile