| @@ 26-36 (lines=11) @@ | ||
| 23 | * |
|
| 24 | * @return $this |
|
| 25 | */ |
|
| 26 | public function and ($expression) |
|
| 27 | { |
|
| 28 | $this->prepareFilterIndex('$and'); |
|
| 29 | ||
| 30 | $this->filters['$and'] = array_merge( |
|
| 31 | $this->filters['$and'], |
|
| 32 | $this->mapExpressions(...func_get_args()) |
|
| 33 | ); |
|
| 34 | ||
| 35 | return $this; |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * @param string $operator |
|
| @@ 76-86 (lines=11) @@ | ||
| 73 | * |
|
| 74 | * @return $this |
|
| 75 | */ |
|
| 76 | public function or ($expression) |
|
| 77 | { |
|
| 78 | $this->prepareFilterIndex('$or'); |
|
| 79 | ||
| 80 | $this->filters['$or'] = array_merge( |
|
| 81 | $this->filters['$or'], |
|
| 82 | $this->mapExpressions(...func_get_args()) |
|
| 83 | ); |
|
| 84 | ||
| 85 | return $this; |
|
| 86 | } |
|
| 87 | ||
| 88 | /** |
|
| 89 | * @param string $field |
|