- Heavy rework on search request handling of entities
This commit is contained in:
1 parent
a9b9c2cce9
commit
11e436236c
8 files changed
+290
-167
No files matched your search
@@ -32,10 +32,10 @@ trait ConditionTrait
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function wheres(array $fieldValues, string $operator = Query\Where::OPERATOR_EQUAL) : self
|
||||
public function wheres(array $fieldValues, string|array $operator = Query\Where::OPERATOR_EQUAL, string|array $condition = Query\Where::CONDITION_AND) : self
|
||||
{
|
||||
foreach($fieldValues as $field => $value) {
|
||||
$this->where($field, $value, $operator);
|
||||
$this->where($field, $value, is_array($operator) ? ( $operator[$field] ?? Query\Where::OPERATOR_EQUAL ) : $operator, is_array($condition) ? ( $condition[$field] ?? Query\Where::CONDITION_AND ) : $condition);
|
||||
}
|
||||
|
||||
return $this;
|
||||
@@ -142,7 +142,7 @@ trait ConditionTrait
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function likes(array $fieldValues, string $condition = Query\Where::CONDITION_AND) : self
|
||||
public function likes(array $fieldValues, string|array $condition = Query\Where::CONDITION_AND) : self
|
||||
{
|
||||
foreach($fieldValues as $field => $value) {
|
||||
$this->like($field, $value);
|
||||
|
||||
Reference in new issue
Block a user