Conditions | 5 |
Paths | 8 |
Total Lines | 17 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
16 | protected function prepareArrayForWhere($bindKey, $bindVal = null, $mainAr = []){ |
||
17 | $ar = $conditionAr = []; |
||
18 | // expecting a string like 'status = :status' |
||
19 | if ($this->checkWherePrepareUsed($bindKey)) { |
||
20 | $conditionAr = preg_split('/:/', $bindKey); |
||
21 | } |
||
22 | |||
23 | // taking the second part just after : |
||
24 | if (is_array($conditionAr) && count($conditionAr)) { |
||
25 | $ar[':'.$conditionAr[1]] = $bindVal; |
||
26 | } |
||
27 | |||
28 | if (count($ar)) { |
||
29 | $mainAr = array_merge($mainAr, $ar); |
||
30 | } |
||
31 | |||
32 | return $mainAr; |
||
33 | } |
||
60 |