1 | <?php |
||
22 | abstract class AbstractQueryBuilder extends \yii\base\Object implements QueryBuilderInterface |
||
23 | { |
||
24 | public $db; |
||
25 | |||
26 | 2 | public function __construct($connection, $config = []) |
|
31 | |||
32 | /** |
||
33 | * Builds config array to create Command. |
||
34 | * @param Query $query |
||
35 | * @throws NotSupportedException |
||
36 | * @return array |
||
37 | */ |
||
38 | 2 | public function build(Query $query) |
|
42 | |||
43 | 3 | public function createRequest($query) |
|
47 | |||
48 | /** |
||
49 | * Prepares query before actual building. |
||
50 | * This function for you to redefine. |
||
51 | * It will be called before other build functions. |
||
52 | * @param Query $query |
||
53 | */ |
||
54 | 2 | public function prepare(Query $query) |
|
58 | |||
59 | /** |
||
60 | * This function is for you to provide your authentication. |
||
61 | * @param Query $query |
||
62 | */ |
||
63 | abstract public function buildAuth(Query $query); |
||
64 | |||
65 | abstract public function buildMethod(Query $query); |
||
66 | |||
67 | abstract public function buildUri(Query $query); |
||
68 | |||
69 | abstract public function buildHeaders(Query $query); |
||
70 | |||
71 | abstract public function buildProtocolVersion(Query $query); |
||
72 | |||
73 | abstract public function buildQueryParams(Query $query); |
||
74 | |||
75 | abstract public function buildFormParams(Query $query); |
||
76 | |||
77 | abstract public function buildBody(Query $query); |
||
78 | |||
79 | /** |
||
80 | * Creates insert request. |
||
81 | * @param string $table |
||
82 | * @param array $columns |
||
83 | * @param array $options |
||
84 | * @return AbstractRequest |
||
85 | */ |
||
86 | 1 | public function insert($table, $columns, array $options = []) |
|
90 | |||
91 | /** |
||
92 | * Creates update request. |
||
93 | * @param string $table |
||
94 | * @param array $columns |
||
95 | * @param array $options |
||
96 | * @return AbstractRequest |
||
97 | */ |
||
98 | public function update($table, $columns, $condition = [], array $options = []) |
||
104 | |||
105 | public function delete($table, $condition = [], array $options = []) |
||
111 | |||
112 | 1 | public function perform($action, $table, $body, $options = []) |
|
118 | |||
119 | 1 | public function createQuery($action, $table, array $options = []) |
|
125 | |||
126 | public function buildCondition($condition) |
||
163 | |||
164 | protected function buildHashCondition($condition) |
||
178 | |||
179 | protected function buildLikeCondition($operator, $operands) |
||
183 | |||
184 | protected function buildIlikeCondition($operator, $operands) |
||
188 | |||
189 | protected function buildCompareCondition($operator, $operands) |
||
197 | |||
198 | protected function buildAndCondition($operator, $operands) |
||
212 | |||
213 | protected function buildBetweenCondition($operator, $operands) |
||
217 | |||
218 | protected function buildInCondition($operator, $operands, $not = false) |
||
248 | |||
249 | protected function buildNotInCondition($operator, $operands) |
||
253 | |||
254 | protected function buildEqCondition($operator, $operands) |
||
260 | |||
261 | protected function buildNotEqCondition($operator, $operands) |
||
267 | |||
268 | protected function buildCompositeInCondition($operator, $columns, $values) |
||
272 | } |
||
273 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: