- Heavy rework on search request handling of entities
This commit is contained in:
1 parent
a9b9c2cce9
commit
11e436236c
8 files changed
+290
-167
No files matched your search
@@ -5,9 +5,8 @@ namespace Ulmus\SearchRequest;
|
||||
use Ulmus\Repository;
|
||||
|
||||
interface SearchRequestInterface {
|
||||
|
||||
/* HOW TO IMPLEMENT THIS !!? */
|
||||
public const SEARCH_REQUEST_OPERATORS = "searchRequest:operators";
|
||||
public const SEARCH_REQUEST_OPERATOR_LIKE = "LIKE";
|
||||
public const SEARCH_REQUEST_OPERATOR_EQUAL = "=";
|
||||
public const SEARCH_REQUEST_OPERATOR_NOT_EQUAL = "!=";
|
||||
public const SEARCH_REQUEST_OPERATOR_GREATER_THAN = ">";
|
||||
@@ -15,11 +14,23 @@ interface SearchRequestInterface {
|
||||
public const SEARCH_REQUEST_OPERATOR_SMALLER_THAN = "<";
|
||||
public const SEARCH_REQUEST_OPERATOR_SMALLER_OR_EQUAL_THAN = "<=";
|
||||
|
||||
public const SEARCH_REQUEST_CONDITIONS = "searchRequest:conditions";
|
||||
public const SEARCH_REQUEST_CONDITION_AND = "AND";
|
||||
public const SEARCH_REQUEST_CONDITION_OR= "OR";
|
||||
|
||||
public function filter(Repository $repository) : Repository;
|
||||
|
||||
|
||||
public function wheres() : iterable;
|
||||
|
||||
|
||||
public function wheresConditions() : iterable;
|
||||
|
||||
public function wheresOperators() : iterable;
|
||||
|
||||
public function likes() : iterable;
|
||||
|
||||
public function likesConditions() : iterable;
|
||||
|
||||
public function likesOperators() : iterable;
|
||||
|
||||
public function orders() : iterable;
|
||||
|
||||
@@ -28,4 +39,8 @@ interface SearchRequestInterface {
|
||||
public function limit() : int;
|
||||
|
||||
public function offset() : int;
|
||||
|
||||
public function applyCount(Repository\RepositoryInterface $repository) : SearchRequestInterface;
|
||||
|
||||
public function apply(Repository\RepositoryInterface $repository) : SearchRequestInterface;
|
||||
}
|
||||
Reference in new issue
Block a user