From 026145356b18668d0fda873c65697ddbbf1826dc Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 17 Apr 2014 14:21:01 +0200 Subject: [PATCH] Add interface "QueryInterface" implementing Browsable, Fetchable, Filterable, Limitable, Sortable, Countable (WIP) This interface is intended to be used within the data views and monitoring controllers. The monitoring list and show controllers should only query data views instead of the actual query. Thus a data view is required to implement the QueryInterface, which will be changed later. The name is not final because it somehow conflicts with the Queryable interface which is also marked as work in progress. --- library/Icinga/Data/BaseQuery.php | 3 +-- library/Icinga/Data/QueryInterface.php | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 library/Icinga/Data/QueryInterface.php diff --git a/library/Icinga/Data/BaseQuery.php b/library/Icinga/Data/BaseQuery.php index c84c66696..4101b7b5c 100644 --- a/library/Icinga/Data/BaseQuery.php +++ b/library/Icinga/Data/BaseQuery.php @@ -2,12 +2,11 @@ namespace Icinga\Data; -use Countable; use Zend_Controller_Front; use Zend_Paginator; use Icinga\Web\Paginator\Adapter\QueryAdapter; -abstract class BaseQuery implements Browsable, Fetchable, Filterable, Limitable, Queryable, Sortable, Countable +abstract class BaseQuery implements QueryInterface, Queryable { /** * Query data source diff --git a/library/Icinga/Data/QueryInterface.php b/library/Icinga/Data/QueryInterface.php new file mode 100644 index 000000000..65612b7ca --- /dev/null +++ b/library/Icinga/Data/QueryInterface.php @@ -0,0 +1,7 @@ +