Merge remote-tracking branch 'origin' into dev-sql-escape
This commit is contained in:
commit
def8decb4e
18 files changed
+246
-26
No files matched your search
@@ -12,12 +12,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;
|
||||
}
|
||||
|
||||
@@ -25,6 +27,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