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:
Diffstat (limited to 'core/API/DataTableManipulator.php')
-rw-r--r--core/API/DataTableManipulator.php26
1 files changed, 20 insertions, 6 deletions
diff --git a/core/API/DataTableManipulator.php b/core/API/DataTableManipulator.php
index 8e692c2171..6226b63b1a 100644
--- a/core/API/DataTableManipulator.php
+++ b/core/API/DataTableManipulator.php
@@ -38,11 +38,14 @@ abstract class Piwik_API_DataTableManipulator
$this->apiMethod = $apiMethod;
$this->request = $request;
}
-
+
/**
- * This method can be used by subclasses to iterate over data tables that might be
+ * This method can be used by subclasses to iterate over data tables that might be
* data table arrays. It calls back the template method self::doManipulate for each table.
* This way, data table arrays can be handled in a transparent fashion.
+ * @param Piwik_DataTable_Array|Piwik_DataTable $dataTable
+ * @throws Exception
+ * @return Piwik_DataTable_Array|Piwik_DataTable
*/
protected function manipulate($dataTable) {
if ($dataTable instanceof Piwik_DataTable_Array)
@@ -76,13 +79,22 @@ abstract class Piwik_API_DataTableManipulator
return $dataTable;
}
-
- /** Template method called from self::manipulate */
+
+ /**
+ * Template method called from self::manipulate
+ * @param Piwik_DataTable $dataTable
+ * @param bool|string $date
+ * @return
+ */
protected abstract function doManipulate(Piwik_DataTable $dataTable, $date=false);
-
+
/**
* Load the subtable for a row.
* Returns null if none is found.
+ *
+ * @param Piwik_Datatable_Row $row
+ * @param bool $date
+ * @throws Exception
* @return Piwik_DataTable
*/
protected function loadSubtable($row, $date=false) {
@@ -127,11 +139,13 @@ abstract class Piwik_API_DataTableManipulator
return $dataTable;
}
-
+
/**
* In this method, subclasses can clean up the request array for loading subtables
* in order to make Piwik_API_ResponseBuilder behave correctly (e.g. not trigger the
* manipulator again).
+ * @param $request
+ * @return
*/
protected abstract function manipulateSubtableRequest(&$request);