From ccd31f6438c78ef789ffeeefc22e743df32f2ad4 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 21 Nov 2017 11:47:27 +0100 Subject: [PATCH] Filter: new abstract methode and better IDE hints fixes #3111 --- library/Icinga/Data/Filter/Filter.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/library/Icinga/Data/Filter/Filter.php b/library/Icinga/Data/Filter/Filter.php index 68ff82f33..635de5660 100644 --- a/library/Icinga/Data/Filter/Filter.php +++ b/library/Icinga/Data/Filter/Filter.php @@ -33,6 +33,14 @@ abstract class Filter abstract public function orFilter(Filter $filter); + /** + * Whether the give row matches this Filter + * + * @param mixed $row Preferrably an stdClass instance + * @return bool + */ + abstract public function matches($row); + public function getUrlParams() { return UrlParams::fromQueryString($this->toQueryString()); @@ -133,7 +141,7 @@ abstract class Filter * @param string $filter Filter expression * * @throws FilterException - * @return FilterWhere + * @return FilterExpression */ public static function where($col, $filter) {