Conditions | 7 |
Paths | 7 |
Total Lines | 21 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | public function parseWhereQuery($whereQuery = []) |
||
32 | { |
||
33 | $ar = []; |
||
34 | if(!count($whereQuery)){ |
||
35 | return $ar; |
||
36 | } |
||
37 | |||
38 | foreach ($whereQuery as $where) { |
||
39 | if (is_array($where[1])) { |
||
40 | foreach ($where[1] as $key => $value) { |
||
41 | $ar[':'.$key] = $value; |
||
42 | } |
||
43 | } elseif ($where[1] != '') { |
||
44 | $arNext = $this->prepareArrayForWhere($where[0], $where[1]); |
||
45 | if (count($arNext)) { |
||
46 | $ar = array_merge($ar, $arNext); |
||
47 | } |
||
48 | } |
||
49 | } |
||
50 | |||
51 | return $ar; |
||
52 | } |
||
59 |