|
@@ -92,9 +92,16 @@ abstract class LuDataAccess {
|
92
|
92
|
*/
|
93
|
93
|
public static function getMultiple($predicates, $orders, $page = 0, $perPage = PHP_INT_MAX)
|
94
|
94
|
{
|
|
95
|
+ /**
|
|
96
|
+ * @var $model LuModel
|
|
97
|
+ */
|
95
|
98
|
$model = static::getModel();
|
96
|
99
|
foreach($predicates as $predicate) {
|
97
|
|
- $model = $model->where($predicate[0], $predicate[1], $predicate[2]);
|
|
100
|
+ $column = $predicate[0];
|
|
101
|
+ $operator = $predicate[1];
|
|
102
|
+ $value = $predicate[2];
|
|
103
|
+ $boolean = isset($predicate[3]) ? $predicate[3] : null;
|
|
104
|
+ $model = $model->where($column, $operator, $value, $boolean);
|
98
|
105
|
}
|
99
|
106
|
$count = $model->count();
|
100
|
107
|
foreach($orders as $order) {
|