1 | <?php |
||
23 | class MySQLiDriver extends DBDriverAbstract{ |
||
24 | |||
25 | /** |
||
26 | * Holds the database resource object |
||
27 | * |
||
28 | * @var mysqli |
||
29 | */ |
||
30 | protected $db; |
||
31 | |||
32 | /** |
||
33 | * Establishes a database connection and returns the connection object |
||
34 | * |
||
35 | * @return \chillerlan\Database\Drivers\DBDriverInterface |
||
36 | * @throws DBException |
||
37 | */ |
||
38 | public function connect():DBDriverInterface{ |
||
80 | |||
81 | /** |
||
82 | * Closes a database connection |
||
83 | * |
||
84 | * @return bool |
||
85 | */ |
||
86 | public function disconnect():bool{ |
||
89 | |||
90 | /** |
||
91 | * Returns info about the used php client |
||
92 | * |
||
93 | * @return string php's database client string |
||
94 | */ |
||
95 | public function getClientInfo():string{ |
||
98 | |||
99 | /** |
||
100 | * Returns info about the database server |
||
101 | * |
||
102 | * @return string database's serverinfo string |
||
103 | */ |
||
104 | public function getServerInfo():string{ |
||
107 | |||
108 | /** |
||
109 | * @param $data |
||
110 | * |
||
111 | * @return string |
||
112 | */ |
||
113 | protected function __escape($data){ |
||
116 | |||
117 | /** |
||
118 | * @param string $sql |
||
119 | * @param string|null $index |
||
120 | * @param bool $assoc |
||
121 | * |
||
122 | * @return bool|\chillerlan\Database\DBResult|\mysqli_result |
||
123 | */ |
||
124 | protected function __raw(string $sql, string $index = null, bool $assoc = true){ |
||
137 | |||
138 | /** |
||
139 | * @param string $sql |
||
140 | * @param array $values |
||
141 | * @param string|null $index |
||
142 | * @param bool $assoc |
||
143 | * |
||
144 | * @return bool|\chillerlan\Database\DBResult |
||
145 | */ |
||
146 | protected function __prepared(string $sql, array $values = [], string $index = null, bool $assoc = true){ |
||
213 | |||
214 | /** |
||
215 | * @param string $sql |
||
216 | * @param array $values |
||
217 | * |
||
218 | * @return bool |
||
219 | */ |
||
220 | protected function __multi(string $sql, array $values){ |
||
234 | |||
235 | /** |
||
236 | * @param string $sql |
||
237 | * @param array $data |
||
238 | * @param $callback |
||
239 | * |
||
240 | * @return bool |
||
241 | */ |
||
242 | protected function __multi_callback(string $sql, array $data, $callback){ |
||
258 | |||
259 | /** |
||
260 | * @param \mysqli_stmt $stmt |
||
261 | * @param \ReflectionMethod $reflectionMethod |
||
262 | * @param array $row |
||
263 | * |
||
264 | * @return void |
||
265 | */ |
||
266 | protected function insertPreparedRow(mysqli_stmt &$stmt, ReflectionMethod &$reflectionMethod, array &$row){ |
||
270 | |||
271 | /** |
||
272 | * Returns a string of types for the given values |
||
273 | * |
||
274 | * @link http://php.net/manual/mysqli-stmt.bind-param.php |
||
275 | * |
||
276 | * @param array $values |
||
277 | * |
||
278 | * @return string |
||
279 | * @internal |
||
280 | */ |
||
281 | protected function getTypes(array &$values){ |
||
300 | |||
301 | /** |
||
302 | * Copies an array to an array of referenced values |
||
303 | * |
||
304 | * @param array $row |
||
305 | * |
||
306 | * @return array |
||
307 | * @see http://php.net/manual/mysqli-stmt.bind-param.php |
||
308 | */ |
||
309 | protected function getReferences(array &$row){ |
||
320 | |||
321 | } |
||
322 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..