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:
authorsgiehl <stefangiehl@gmail.com>2012-05-28 21:29:23 +0400
committersgiehl <stefangiehl@gmail.com>2012-05-28 21:29:23 +0400
commit06bb25eb436e6d17d79eb44b286a1d877328142d (patch)
treef92a56ad52588a20b8bf16eb466ce920c2a65c2b /core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php
parent90ae9e10229fc517dd1c9f406736cc091b6cf970 (diff)
added/fixed doc blocks
git-svn-id: http://dev.piwik.org/svn/trunk@6353 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php')
-rw-r--r--core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php38
1 files changed, 25 insertions, 13 deletions
diff --git a/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php b/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php
index eb92e7a526..b7e2427c28 100644
--- a/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php
+++ b/core/DataTable/Filter/ColumnCallbackAddColumnQuotient.php
@@ -29,15 +29,15 @@ class Piwik_DataTable_Filter_ColumnCallbackAddColumnQuotient extends Piwik_DataT
protected $getDivisorFromSummaryRow;
/**
- * @param Piwik_DataTable $table
- * @param string $columnNameToAdd
- * @param string $columnValueToRead
- * @param numeric|string $divisorValueOrDivisorColumnName
- * if a numeric value is given, we use this value as the divisor to process the percentage.
- * if a string is given, this string is the column name's value used as the divisor.
- * @param int $quotientPrecision Division precision
- * @param bool|numeric $shouldSkipRows Whether rows w/o the column to read should be skipped.
- * @param bool $getDivisorFromSummaryRow Whether to get the divisor from the summary row or the current row.
+ * @param Piwik_DataTable $table
+ * @param string $columnNameToAdd
+ * @param string $columnValueToRead
+ * @param number|string $divisorValueOrDivisorColumnName
+ * if a numeric value is given, we use this value as the divisor to process the percentage.
+ * if a string is given, this string is the column name's value used as the divisor.
+ * @param int $quotientPrecision Division precision
+ * @param bool|number $shouldSkipRows Whether rows w/o the column to read should be skipped.
+ * @param bool $getDivisorFromSummaryRow Whether to get the divisor from the summary row or the current row.
*/
public function __construct( $table, $columnNameToAdd, $columnValueToRead, $divisorValueOrDivisorColumnName, $quotientPrecision = 0, $shouldSkipRows = false, $getDivisorFromSummaryRow = false)
{
@@ -57,7 +57,12 @@ class Piwik_DataTable_Filter_ColumnCallbackAddColumnQuotient extends Piwik_DataT
$this->shouldSkipRows = $shouldSkipRows;
$this->getDivisorFromSummaryRow = $getDivisorFromSummaryRow;
}
-
+
+ /**
+ * Filters the given data table
+ *
+ * @param Piwik_DataTable $table
+ */
public function filter($table)
{
foreach($table->getRows() as $key => $row)
@@ -82,7 +87,14 @@ class Piwik_DataTable_Filter_ColumnCallbackAddColumnQuotient extends Piwik_DataT
$this->filterSubTable($row);
}
}
-
+
+ /**
+ * Formats the given value
+ *
+ * @param number $value
+ * @param number $divisor
+ * @return float|int
+ */
protected function formatValue($value, $divisor)
{
$quotient = 0;
@@ -97,7 +109,7 @@ class Piwik_DataTable_Filter_ColumnCallbackAddColumnQuotient extends Piwik_DataT
* Returns the dividend to use when calculating the new column value. Can
* be overridden by descendent classes to customize behavior.
*
- * @param Piwik_DataTable_Row $row The row being modified.
+ * @param Piwik_DataTable_Row $row The row being modified.
* @return int|float
*/
protected function getDividend($row)
@@ -109,7 +121,7 @@ class Piwik_DataTable_Filter_ColumnCallbackAddColumnQuotient extends Piwik_DataT
* Returns the divisor to use when calculating the new column value. Can
* be overridden by descendent classes to customize behavior.
*
- * @param Piwik_DataTable_Row $row The row being modified.
+ * @param Piwik_DataTable_Row $row The row being modified.
* @return int|float
*/
protected function getDivisor($row)