diff --git a/library/Icinga/Data/Filter/Filter.php b/library/Icinga/Data/Filter/Filter.php index 99b0290f1..0688d2cc0 100644 --- a/library/Icinga/Data/Filter/Filter.php +++ b/library/Icinga/Data/Filter/Filter.php @@ -22,6 +22,10 @@ abstract class Filter return $this; } + abstract public function isExpression(); + + abstract public function isChain(); + abstract function toQueryString(); public function getUrlParams() diff --git a/library/Icinga/Data/Filter/FilterChain.php b/library/Icinga/Data/Filter/FilterChain.php index 9d32252fe..c7697b7ad 100644 --- a/library/Icinga/Data/Filter/FilterChain.php +++ b/library/Icinga/Data/Filter/FilterChain.php @@ -166,6 +166,16 @@ abstract class FilterChain extends Filter } } + public function isExpression() + { + return false; + } + + public function isChain() + { + return true; + } + public function isEmpty() { return empty($this->filters); diff --git a/library/Icinga/Data/Filter/FilterExpression.php b/library/Icinga/Data/Filter/FilterExpression.php index 8378b5ae3..8f78d6a87 100644 --- a/library/Icinga/Data/Filter/FilterExpression.php +++ b/library/Icinga/Data/Filter/FilterExpression.php @@ -19,6 +19,16 @@ class FilterExpression extends Filter $this->expression = $expression; } + public function isExpression() + { + return true; + } + + public function isChain() + { + return false; + } + public function isEmpty() { return false;