Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-08-06 00:40:53 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-08-06 11:02:59 +0400
commit3528547ccf8e7c2a354b31be2b7e0f4c7ebcc093 (patch)
tree3a8f1533cfc693ffafd1b82854a4d17e6b774584 /core/DataTable.php
parent1380c33bc5b9996a09e3c5b3b5a5eac808c7b320 (diff)
refs #5896 tests are showing converting an array to a dataTable and run the filters on it will not work. Instead run the filters directly on the array. Therefore, to not have duplicated code the dataTable and row can be now treated as an array and we access them like an array in the ColumnDelete filter which will be for now the only filter is applied on arrays
Diffstat (limited to 'core/DataTable.php')
-rw-r--r--core/DataTable.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/DataTable.php b/core/DataTable.php
index 3f112edb1f..1e594e4e41 100644
--- a/core/DataTable.php
+++ b/core/DataTable.php
@@ -165,7 +165,7 @@ require_once PIWIK_INCLUDE_PATH . '/core/Common.php';
*
* @api
*/
-class DataTable implements DataTableInterface
+class DataTable implements DataTableInterface, \IteratorAggregate
{
const MAX_DEPTH_DEFAULT = 15;
@@ -1633,4 +1633,8 @@ class DataTable implements DataTableInterface
}
$thisRow->sumRow($row, $copyMeta = true, $this->getMetadata(self::COLUMN_AGGREGATION_OPS_METADATA_NAME));
}
+
+ public function getIterator() {
+ return new \ArrayIterator($this->rows);
+ }
} \ No newline at end of file