1 | <?php |
||
34 | trait WhereTrait |
||
35 | { |
||
36 | |||
37 | private $where; |
||
38 | |||
39 | /** |
||
40 | * Adds the prefix WHERE to what the where object has provided as a where statement |
||
41 | * @return string|null returns a full WHERE statement will return null if not statement provided |
||
42 | * @since v1.0.0 |
||
43 | */ |
||
44 | 24 | public function getWhereStatement() |
|
51 | |||
52 | /** |
||
53 | * checks to see if a where statement has been provided |
||
54 | * @return bool checks to see if a where statement has been set |
||
55 | * @since v1.0.0 |
||
56 | */ |
||
57 | 29 | protected function hasWhere() |
|
61 | |||
62 | /** |
||
63 | * returns where statement given to object |
||
64 | * @return WhereStatementInterface provides stored where statement object |
||
65 | * @since v1.0.0 |
||
66 | */ |
||
67 | 15 | public function getWhere() |
|
71 | |||
72 | /** |
||
73 | * adds a where statement to a given statement |
||
74 | * @param null|WhereStatementInterface $where where statement to be used added |
||
75 | * @return CommandInterface bubbling |
||
76 | * @since v1.0.0 |
||
77 | */ |
||
78 | 50 | public function setWhere(WhereStatementInterface $where = null) |
|
83 | |||
84 | /** |
||
85 | * returns an array that can be used in a prepared statement |
||
86 | * @return array an array of data specific to the data of the where statement |
||
87 | * @since v1.0.0 |
||
88 | */ |
||
89 | 21 | public function getWhereData() |
|
97 | } |
||
98 |