Merge remote-tracking branch 'origin' into dev-sql-escape

This commit is contained in:
Dave Mc Nicoll committed 2020-04-09 10:00:48 -04:00
commit def8decb4e
18 files changed
+246 -26

No files matched your search

+3
View File
@@ -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);