Dashboard\Classes\ReportFetchDataResult
Overview
Represents the result of fetching report data.
Public Methods
public __construct()
public __construct(array $rows = []): void
Constructs a new ReportFetchDataResult instance.
public addRow()
public addRow(object $row): ReportFetchDataResult
Adds a row to the result dataset.
public getMetricTotals()
public getMetricTotals(): array
Retrieves metric totals.
public getRows()
public getRows(): array
Returns the dataset rows.
public getTotalRecords()
public getTotalRecords(): int
Returns the number of records on all pages of a paginated data set.
public isPreAggregated()
public isPreAggregated(): bool
Returns whether the data has been pre-aggregated by the date group interval.
public setMetricTotals()
public setMetricTotals(array $metricTotals): void
Sets metric totals.
public setPreAggregated()
public setPreAggregated(
$preAggregated = true
): Dashboard\Classes\ReportFetchDataResult
Sets the pre-aggregated flag indicating the data has already been aggregated by the date group interval at the query level.
public setRows()
public setRows(array $rows): ReportFetchDataResult
Sets the result dataset rows. This method overrides rows set previously.
public setTotalRecords()
public setTotalRecords(int $totalRecords): ReportFetchDataResult
Sets the number of records on all pages of a paginated data set.