| @@ 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 array|Expression $expression | |
| @@ 43-53 (lines=11) @@ | ||
| 40 | * | |
| 41 | * @return $this | |
| 42 | */ | |
| 43 | public function or($expression) | |
| 44 |     { | |
| 45 |         $this->prepareFilterIndex('$or'); | |
| 46 | ||
| 47 | $this->filters['$or'] = array_merge( | |
| 48 | $this->filters['$or'], | |
| 49 | $this->mapExpressions(...func_get_args()) | |
| 50 | ); | |
| 51 | ||
| 52 | return $this; | |
| 53 | } | |
| 54 | ||
| 55 | /** | |
| 56 | * @param string $field | |