summaryrefslogtreecommitdiffstats
path: root/library/Icinga/Data/Filter/FilterEqualOrGreaterThan.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/Icinga/Data/Filter/FilterEqualOrGreaterThan.php')
-rw-r--r--library/Icinga/Data/Filter/FilterEqualOrGreaterThan.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/library/Icinga/Data/Filter/FilterEqualOrGreaterThan.php b/library/Icinga/Data/Filter/FilterEqualOrGreaterThan.php
new file mode 100644
index 0000000..d7bd5b8
--- /dev/null
+++ b/library/Icinga/Data/Filter/FilterEqualOrGreaterThan.php
@@ -0,0 +1,16 @@
+<?php
+/* Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ */
+
+namespace Icinga\Data\Filter;
+
+class FilterEqualOrGreaterThan extends FilterExpression
+{
+ public function matches($row)
+ {
+ if (! isset($row->{$this->column})) {
+ return false;
+ }
+
+ return (string) $row->{$this->column} >= (string) $this->expression;
+ }
+}