1 | <?php |
||
8 | class LogicalConnection |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | private $name; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $dsn; |
||
19 | |||
20 | /** |
||
21 | * @var \Doctrine_Manager |
||
22 | */ |
||
23 | private $manager; |
||
24 | |||
25 | /** |
||
26 | * @param string $name |
||
27 | * @param string $dsn |
||
28 | * @param \Doctrine_Manager $manager |
||
29 | */ |
||
30 | 5 | public function __construct($name = null, $dsn, \Doctrine_Manager $manager) |
|
38 | |||
39 | /** |
||
40 | * @return string |
||
41 | */ |
||
42 | 3 | public function getName() |
|
46 | |||
47 | /** |
||
48 | * @return string |
||
49 | */ |
||
50 | 3 | public function getDsn() |
|
54 | |||
55 | /** |
||
56 | * @return \Doctrine_Manager |
||
57 | */ |
||
58 | 3 | public function getManager() |
|
62 | |||
63 | /** |
||
64 | * @return int |
||
65 | */ |
||
66 | 10 | public function beginTransaction() |
|
70 | |||
71 | /** |
||
72 | * @return bool |
||
73 | */ |
||
74 | 7 | public function commit() |
|
78 | |||
79 | /** |
||
80 | * Rolls back the transaction. |
||
81 | * It makes sure that the connection is in the correct state regardless of what happened before. |
||
82 | * Correct state means that the connection does not have a transaction nesting level > 0 |
||
83 | * |
||
84 | * @return bool |
||
85 | */ |
||
86 | 6 | public function rollBack() |
|
98 | |||
99 | /** |
||
100 | * @param \Closure $func |
||
101 | * |
||
102 | * @throws \Exception |
||
103 | */ |
||
104 | 7 | public function transactional(\Closure $func) |
|
115 | |||
116 | /** |
||
117 | * @return int |
||
118 | */ |
||
119 | 2 | public function getTransactionNestingLevel() |
|
123 | |||
124 | /** |
||
125 | * @param string $query |
||
126 | * @param array $params |
||
127 | * |
||
128 | * @return \Doctrine_Adapter_Statement|\PDOStatement |
||
129 | */ |
||
130 | 4 | public function executeUpdate($query, array $params = []) |
|
134 | |||
135 | /** |
||
136 | * @param string $query |
||
137 | * @param array $params |
||
138 | * |
||
139 | * @return \PDOStatement|\Doctrine_Adapter_Statement |
||
140 | */ |
||
141 | 16 | public function executeQuery($query, array $params = []) |
|
145 | |||
146 | /** |
||
147 | * @param string $tableName |
||
148 | * @param array $data |
||
149 | * |
||
150 | * @return int |
||
151 | */ |
||
152 | 7 | public function insert($tableName, array $data) |
|
165 | |||
166 | /** |
||
167 | * @return string |
||
168 | */ |
||
169 | 2 | public function lastInsertId() |
|
173 | |||
174 | /** |
||
175 | * @param \Exception $e |
||
176 | * |
||
177 | * @return \Exception |
||
178 | */ |
||
179 | 4 | public function reconnectIfNeeded(\Exception $e) |
|
195 | |||
196 | /** |
||
197 | * @return bool |
||
198 | * @throws \Doctrine_Connection_Exception |
||
199 | */ |
||
200 | 6 | public function connect() |
|
204 | |||
205 | /** |
||
206 | * @return \Doctrine_Connection |
||
207 | */ |
||
208 | 5 | public function getWrappedConnection() |
|
212 | |||
213 | /** |
||
214 | * @return bool |
||
215 | */ |
||
216 | 4 | public function ping() |
|
228 | |||
229 | /** |
||
230 | * @return bool |
||
231 | */ |
||
232 | 4 | public function isEmbeddedDatabase() |
|
241 | |||
242 | /** |
||
243 | * @param string $tableName |
||
244 | * @param array $fields |
||
245 | * @param array $options |
||
246 | */ |
||
247 | public function createTable($tableName, array $fields = [], array $options = []) |
||
251 | |||
252 | /** |
||
253 | * @return \Doctrine_Connection |
||
254 | * @throws \Doctrine_Connection_Exception |
||
255 | * @throws \Doctrine_Manager_Exception |
||
256 | */ |
||
257 | 16 | private function getConnection() |
|
277 | |||
278 | /** |
||
279 | * Taken from doctrine 2 |
||
280 | * |
||
281 | * @return string |
||
282 | */ |
||
283 | 4 | private function getDummySelectSQL() |
|
298 | } |
||
299 |
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: