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