Data/interfaces: add Filterable, extend Connection

New interface ConnectionInterface attempts to aggregate things.
Extended Filterable interface, added Filter-related functions. Please
note that apply will probably get dropped later on, I'll keep it for
compatibility reasons right now.

refs #6418
This commit is contained in:
Thomas Gelf 2014-06-06 06:07:33 +00:00
parent f438cb30e1
commit 85605597cc
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,5 @@
<?php
namespace Icinga\Data;
interface ConnectionInterface extends Selectable, Queryable {};

View File

@ -2,7 +2,20 @@
namespace Icinga\Data;
use Icinga\Data\Filter\Filter;
/**
* Interface for filtering a result set
*/
interface Filterable {}
interface Filterable
{
public function applyFilter(Filter $filter);
public function setFilter(Filter $filter);
public function getFilter(Filter $filter);
public function addFilter(Filter $filter);
public function where($condition, $value = null);
}