1 | <?php |
||
18 | trait WhereTrait |
||
19 | { |
||
20 | /** |
||
21 | * |
||
22 | * Adds a WHERE condition to the query by AND. If the condition has |
||
23 | * ?-placeholders, additional arguments to the method will be bound to |
||
24 | * those placeholders sequentially. |
||
25 | * |
||
26 | * @param string $cond The WHERE condition. |
||
27 | * @param mixed ...$bind arguments to be bound to placeholders |
||
28 | * |
||
29 | * @return $this |
||
30 | * |
||
31 | */ |
||
32 | 55 | public function where($cond, ...$bind) |
|
37 | |||
38 | /** |
||
39 | * |
||
40 | * Adds a WHERE condition to the query by OR. If the condition has |
||
41 | * ?-placeholders, additional arguments to the method will be bound to |
||
42 | * those placeholders sequentially. |
||
43 | * |
||
44 | * @param string $cond The WHERE condition. |
||
45 | * @param mixed ...$bind arguments to be bound to placeholders |
||
46 | * |
||
47 | * @return $this |
||
48 | * |
||
49 | * @see where() |
||
50 | * |
||
51 | */ |
||
52 | 29 | public function orWhere($cond, ...$bind) |
|
57 | |||
58 | /** |
||
59 | * |
||
60 | * Adds a WHERE condition to the query by AND or OR. If the condition has |
||
61 | * ?-placeholders, additional arguments to the method will be bound to |
||
62 | * those placeholders sequentially. |
||
63 | * |
||
64 | * @param string $andor Add the condition using this operator, typically |
||
65 | * 'AND' or 'OR'. |
||
66 | * @param string $cond The WHERE condition. |
||
67 | * @param mixed ...$bind arguments to bind to placeholders |
||
68 | * |
||
69 | * @return $this |
||
70 | * |
||
71 | */ |
||
72 | abstract protected function addWhere($andor, $cond, ...$bind); |
||
73 | } |
||
74 |