- Multiple bugfixe linked to query fragments

- Added a new SearchRequest package to handle search request efficiently
This commit is contained in:
Dave Mc Nicoll committed 2020-03-28 22:13:29 -04:00
1 parent 4b29232543
commit 938639a590
15 files changed
+148 -27

No files matched your search

+3
View File
@@ -10,12 +10,14 @@ class OrderBy extends Fragment {
public function set(array $order) : self
{
$this->orderBy = $order;
return $this;
}
public function add(string $field, ? string $direction = null) : self
{
$this->orderBy[] = [ $field, $direction ];
return $this;
}
@@ -23,6 +25,7 @@ class OrderBy extends Fragment {
{
$list = array_map(function($item) {
list($field, $direction) = $item;
return $field . ( $direction ? " $direction" : "" );
}, $this->orderBy);