1 | <?php |
||
32 | class QueryManagerDb implements QueryManagerDbInterface { |
||
33 | |||
34 | /** |
||
35 | * @var Container |
||
36 | */ |
||
37 | private $container; |
||
38 | |||
39 | /** |
||
40 | * @var \Enlight_Components_Db_Adapter_Pdo_Mysql |
||
41 | */ |
||
42 | private $db; |
||
43 | |||
44 | /** |
||
45 | * QueryManagerDb constructor. |
||
46 | * @param Container $container |
||
47 | * @param \Enlight_Components_Db_Adapter_Pdo_Mysql $db |
||
48 | */ |
||
49 | public function __construct(Container $container, \Enlight_Components_Db_Adapter_Pdo_Mysql $db) |
||
54 | |||
55 | /** |
||
56 | * @param $query |
||
57 | * @return \Enlight_Components_Db_Adapter_Pdo_Mysql|\mysqli |
||
58 | */ |
||
59 | private function getConnection($query) |
||
71 | |||
72 | /** |
||
73 | * @param $query |
||
74 | * @return \mysqli|\Zend_Db_Statement_Pdo |
||
75 | */ |
||
76 | public function query($query) |
||
84 | |||
85 | /** |
||
86 | * @param \mysqli|\Zend_Db_Statement_Pdo $query |
||
87 | * @return int |
||
88 | */ |
||
89 | public function getRowCount($query) |
||
96 | |||
97 | /** |
||
98 | * @param \mysqli|\Zend_Db_Statement_Pdo $query |
||
99 | * @return int |
||
100 | */ |
||
101 | public function getColumnCount($query) |
||
108 | |||
109 | /** |
||
110 | * @param \mysqli|\Zend_Db_Statement_Pdo $query |
||
111 | * @return array |
||
112 | */ |
||
113 | public function fetchAll($query) |
||
126 | |||
127 | /** |
||
128 | * @param \mysqli|\Zend_Db_Statement_Pdo $query |
||
129 | * @return bool |
||
130 | */ |
||
131 | public function nextResult($query) |
||
138 | |||
139 | /** |
||
140 | * @param \mysqli|\Zend_Db_Statement_Pdo $query |
||
141 | * @return bool |
||
142 | */ |
||
143 | public function close($query) |
||
152 | |||
153 | } |