diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-10-05 06:31:51 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-10-05 06:31:51 +0400 |
commit | 624efca3e96853f7ff40d5b323f26688a951b5f4 (patch) | |
tree | 4c3d996e5b86cb7d428b2afb454b4c8b2adc8395 /plugins/Referers | |
parent | 99940a44a19e5ef4d24b83b61ce2130f96530df6 (diff) |
Renaming DataTable\Array to DataTable\Map in comments and tests
Diffstat (limited to 'plugins/Referers')
-rw-r--r-- | plugins/Referers/API.php | 14 | ||||
-rw-r--r-- | plugins/Referers/Controller.php | 4 |
2 files changed, 10 insertions, 8 deletions
diff --git a/plugins/Referers/API.php b/plugins/Referers/API.php index dbcae011fd..40542ef26f 100644 --- a/plugins/Referers/API.php +++ b/plugins/Referers/API.php @@ -170,7 +170,7 @@ class API } // set subtable IDs for each row to the label (which holds the int referrer type) - // NOTE: not yet possible to do this w/ DataTable_Array instances + // NOTE: not yet possible to do this w/ DataTable\Map instances if (!($dataTable instanceof DataTable\Map)) { $this->setGetReferrerTypeSubtables($dataTable, $idSite, $period, $date, $segment, $expanded); } @@ -275,7 +275,7 @@ class API // If period=lastX we only keep the first resultset as we want to return a plain list if ($table instanceof DataTable\Map) { - $tables = $table->getArray(); + $tables = $table->getDataTables(); $table = current($tables); } // Keep the response simple, only include keywords @@ -316,7 +316,7 @@ class API $searchEngines->applyQueuedFilters(); if ($searchEngines instanceof DataTable\Map) { - $dataTables = $searchEngines->getArray(); + $dataTables = $searchEngines->getDataTables(); // find first datatable containing data foreach ($dataTables AS $subTable) { @@ -480,7 +480,7 @@ class API private function removeSubtableMetadata($dataTable) { if ($dataTable instanceof DataTable\Map) { - foreach ($dataTable->getArray() as $childTable) { + foreach ($dataTable->getDataTables() as $childTable) { $this->removeSubtableMetadata($childTable); } } else { @@ -500,7 +500,7 @@ class API private function setSocialIdSubtables($dataTable) { if ($dataTable instanceof DataTable\Map) { - foreach ($dataTable->getArray() as $childTable) { + foreach ($dataTable->getDataTables() as $childTable) { $this->setSocialIdSubtables($childTable); } } else { @@ -532,7 +532,7 @@ class API private function removeSubtableIds($table) { if ($table instanceof DataTable\Map) { - foreach ($table->getArray() as $childTable) { + foreach ($table->getDataTables() as $childTable) { $this->removeSubtableIds($childTable); } } else { @@ -592,7 +592,7 @@ class API */ private function replaceEmptyDataTablesWith(Map $replaceIn, Map $replaceWith) { - foreach ($replaceWith->getArray() as $label => $replaceWithChildTable) { + foreach ($replaceWith->getDataTables() as $label => $replaceWithChildTable) { if ($replaceWithChildTable instanceof Map) { // recurse $this->replaceEmptyDataTablesWith($replaceIn->getTable($label), $replaceWithChildTable); } else { diff --git a/plugins/Referers/Controller.php b/plugins/Referers/Controller.php index 34b79f3f3d..bf42b0c949 100644 --- a/plugins/Referers/Controller.php +++ b/plugins/Referers/Controller.php @@ -11,6 +11,7 @@ namespace Piwik\Plugins\Referers; use Piwik\API\Request; +use Piwik\DataTable\Map; use Piwik\Metrics; use Piwik\Period\Range; use Piwik\Piwik; @@ -357,7 +358,8 @@ class Controller extends \Piwik\Controller . '&format=original'; $request = new Request($topPageUrlRequest); $request = $request->process(); - $tables = $request->getArray(); + /** @var $request Map */ + $tables = $request->getDataTables();; $topPageUrl = false; $first = key($tables); |