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/ExcludeLowPopulation.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/ExcludeLowPopulation.php')
-rw-r--r--core/DataTable/Filter/ExcludeLowPopulation.php24
1 files changed, 22 insertions, 2 deletions
diff --git a/core/DataTable/Filter/ExcludeLowPopulation.php b/core/DataTable/Filter/ExcludeLowPopulation.php
index 4d2ece04a1..0526e6f753 100644
--- a/core/DataTable/Filter/ExcludeLowPopulation.php
+++ b/core/DataTable/Filter/ExcludeLowPopulation.php
@@ -24,6 +24,15 @@ class Piwik_DataTable_Filter_ExcludeLowPopulation extends Piwik_DataTable_Filter
{
static public $minimumValue;
const MINIMUM_SIGNIFICANT_PERCENTAGE_THRESHOLD = 0.02;
+
+ /**
+ * Constructor
+ *
+ * @param Piwik_DataTable $table
+ * @param string $columnToFilter column to filter
+ * @param number $minimumValue minimum value
+ * @param bool $minimumPercentageThreshold
+ */
public function __construct( $table, $columnToFilter, $minimumValue, $minimumPercentageThreshold = false )
{
parent::__construct($table);
@@ -41,7 +50,12 @@ class Piwik_DataTable_Filter_ExcludeLowPopulation extends Piwik_DataTable_Filter
}
self::$minimumValue = $minimumValue;
}
-
+
+ /**
+ * Executes filter and removes all rows below the defined minimum
+ *
+ * @param Piwik_DataTable $table
+ */
function filter($table)
{
$table->filter('ColumnCallbackDeleteRow',
@@ -50,7 +64,13 @@ class Piwik_DataTable_Filter_ExcludeLowPopulation extends Piwik_DataTable_Filter
)
);
}
-
+
+ /**
+ * Checks whether the given value is below the defined minimum
+ *
+ * @param number $value value to check
+ * @return bool
+ */
static public function excludeLowPopulation($value)
{
return $value >= self::$minimumValue;