1 | <?php |
||
36 | trait MySQLiByDanielGPstructures |
||
37 | { |
||
38 | |||
39 | use MySQLiByDanielGP, |
||
40 | MySQLiByDanielGPqueries; |
||
41 | |||
42 | /** |
||
43 | * Ensures table has special quoes and DOT as final char |
||
44 | * (if not empty, of course) |
||
45 | * |
||
46 | * @param string $referenceTable |
||
47 | * @return string |
||
48 | */ |
||
49 | private function correctTableWithQuotesAsFieldPrefix($referenceTable) |
||
56 | |||
57 | /** |
||
58 | * Prepares the output of text fields defined w. FKs |
||
59 | * |
||
60 | * @param array $foreignKeysArray |
||
61 | * @param array $value |
||
62 | * @param array $iar |
||
63 | * @return string |
||
64 | */ |
||
65 | protected function getFieldOutputTextFK($foreignKeysArray, $value, $iar) |
||
85 | |||
86 | /** |
||
87 | * Prepares the output of text fields w/o FKs |
||
88 | * |
||
89 | * @param array $value |
||
90 | * @param array $iar |
||
91 | * @return string |
||
92 | */ |
||
93 | protected function getFieldOutputTextNonFK($value, $iar) |
||
109 | |||
110 | /** |
||
111 | * Return the list of Tables from the MySQL server |
||
112 | * |
||
113 | * @return string |
||
114 | */ |
||
115 | protected function getMySQLStatistics($filterArray = null) |
||
119 | |||
120 | /** |
||
121 | * returns a list of MySQL databases |
||
122 | * |
||
123 | * @return array |
||
124 | */ |
||
125 | protected function getMySQLactiveDatabases() |
||
129 | |||
130 | /** |
||
131 | * returns a list of active MySQL engines |
||
132 | * |
||
133 | * @return array |
||
134 | */ |
||
135 | protected function getMySQLactiveEngines() |
||
139 | |||
140 | /** |
||
141 | * returns the list of all MySQL global variables |
||
142 | * |
||
143 | * @return array |
||
144 | */ |
||
145 | protected function getMySQLglobalVariables() |
||
149 | |||
150 | /** |
||
151 | * returns a list of MySQL indexes (w. choice of to choose any combination of db/table/column) |
||
152 | * |
||
153 | * @return array |
||
154 | */ |
||
155 | protected function getMySQLlistColumns($filterArray = null) |
||
159 | |||
160 | /** |
||
161 | * returns a list of MySQL databases (w. choice of exclude/include the system ones) |
||
162 | * |
||
163 | * @return array |
||
164 | */ |
||
165 | protected function getMySQLlistDatabases($excludeSystemDbs = true) |
||
169 | |||
170 | /** |
||
171 | * returns a list of MySQL engines (w. choice of return only the active ones) |
||
172 | * |
||
173 | * @return array |
||
174 | */ |
||
175 | protected function getMySQLlistEngines($onlyActiveOnes = true) |
||
179 | |||
180 | /** |
||
181 | * returns a list of MySQL indexes (w. choice of to choose any combination of db/table/column) |
||
182 | * |
||
183 | * @return array |
||
184 | */ |
||
185 | protected function getMySQLlistIndexes($filterArray = null) |
||
189 | |||
190 | /** |
||
191 | * Return various informations (from predefined list) from the MySQL server |
||
192 | * |
||
193 | * @return int|array |
||
194 | */ |
||
195 | private function getMySQLlistMultiple($returnChoice, $returnType, $additionalFeatures = null) |
||
205 | |||
206 | /** |
||
207 | * Return various informations (from predefined list) from the MySQL server |
||
208 | * |
||
209 | * @return array |
||
210 | */ |
||
211 | private function getMySQLlistMultipleFinal($returnChoice, $returnType, $additionalFeatures = null) |
||
228 | |||
229 | /** |
||
230 | * Return the list of Tables from the MySQL server |
||
231 | * |
||
232 | * @return string |
||
233 | */ |
||
234 | protected function getMySQLlistTables($filterArray = null) |
||
238 | |||
239 | /** |
||
240 | * Return the time from the MySQL server |
||
241 | * |
||
242 | * @return string |
||
243 | */ |
||
244 | protected function getMySQLserverTime() |
||
248 | |||
249 | /** |
||
250 | * Reads data from table into REQUEST super global |
||
251 | * |
||
252 | * @param string $tableName |
||
253 | * @param array $filtersArray |
||
254 | */ |
||
255 | protected function getRowDataFromTable($tableName, $filtersArray) |
||
267 | |||
268 | /** |
||
269 | * Builds an filter string from pair of key and value, where value is array |
||
270 | * |
||
271 | * @param string $key |
||
272 | * @param array $value |
||
273 | * @param string $referenceTable |
||
274 | * @return string |
||
275 | */ |
||
276 | private function setArrayLineArrayToFilter($key, $value, $referenceTable) |
||
285 | |||
286 | /** |
||
287 | * Builds an filter string from pair of key and value, none array |
||
288 | * |
||
289 | * @param string $key |
||
290 | * @param int|float|string $value |
||
291 | * @return string |
||
292 | */ |
||
293 | private function setArrayLineToFilter($key, $value) |
||
301 | |||
302 | /** |
||
303 | * Transforms an array into usable filters |
||
304 | * |
||
305 | * @param array $entryArray |
||
306 | * @param string $referenceTable |
||
307 | * @return array |
||
308 | */ |
||
309 | private function setArrayToFilterValues($entryArray, $referenceTable = '') |
||
322 | } |
||
323 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.