From 6df7be7ee55a99c1ee91dbf72499925d89c94c89 Mon Sep 17 00:00:00 2001 From: Alexander Klimov Date: Mon, 21 Jul 2014 14:09:40 +0200 Subject: [PATCH] File/Query: Fix `applyFilter' and `order' not matching SimpleQuery's interfaces refs #6722 --- library/Icinga/Protocol/File/Query.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/library/Icinga/Protocol/File/Query.php b/library/Icinga/Protocol/File/Query.php index d8806b2bc..f88426bca 100644 --- a/library/Icinga/Protocol/File/Query.php +++ b/library/Icinga/Protocol/File/Query.php @@ -5,6 +5,7 @@ namespace Icinga\Protocol\File; use Icinga\Data\SimpleQuery; +use Icinga\Data\Filter\Filter; /** * Class Query @@ -32,7 +33,7 @@ class Query extends SimpleQuery /** * Nothing to do here */ - public function applyFilter() + public function applyFilter(Filter $filter) {} /** @@ -42,9 +43,11 @@ class Query extends SimpleQuery * * @return Query */ - public function order($dir) + public function order($field, $direction = null) { - $this->sortDir = ($dir === null || strtoupper(trim($dir)) === 'DESC') ? self::SORT_DESC : self::SORT_ASC; + $this->sortDir = ( + $direction === null || strtoupper(trim($direction)) === 'DESC' + ) ? self::SORT_DESC : self::SORT_ASC; return $this; } @@ -80,4 +83,4 @@ class Query extends SimpleQuery { return $this->filters; } -} \ No newline at end of file +}