- Multiple bugfixe linked to query fragments
- Added a new SearchRequest package to handle search request efficiently
This commit is contained in:
1 parent
4b29232543
commit
938639a590
15 files changed
+148
-27
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user