File/Query: Fix `applyFilter' and `order' not matching SimpleQuery's interfaces

refs #6722
This commit is contained in:
Alexander Klimov 2014-07-21 14:09:40 +02:00
parent da78445686
commit 6df7be7ee5
1 changed files with 7 additions and 4 deletions

View File

@ -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;
}
}
}