| @@ 42-48 (lines=7) @@ | ||
| 39 | */ |
|
| 40 | public function compile(ExpressionBuilder $builder, $table_name, $negate = false) { |
|
| 41 | // normal case: 1 or 2 or 3 ... |
|
| 42 | if (!$negate) { |
|
| 43 | $orX = $builder->orX(); |
|
| 44 | foreach ($this->variables as $variable) { |
|
| 45 | $orX->add($variable->compile($builder, $table_name)); |
|
| 46 | } |
|
| 47 | return $orX; |
|
| 48 | } |
|
| 49 | // negated case: not (left_condition or right_condition) |
|
| 50 | // = not left_condition and not right_condition |
|
| 51 | if ($negate) { |
|
| @@ 51-57 (lines=7) @@ | ||
| 48 | } |
|
| 49 | // negated case: not (left_condition or right_condition) |
|
| 50 | // = not left_condition and not right_condition |
|
| 51 | if ($negate) { |
|
| 52 | $andX = $builder->andX(); |
|
| 53 | foreach ($this->variables as $variable) { |
|
| 54 | $andX->add($variable->compile($builder, $table_name, true)); |
|
| 55 | } |
|
| 56 | return $andX; |
|
| 57 | } |
|
| 58 | } |
|
| 59 | } |
|
| 60 | ||