1 | <?php |
||
9 | class MysqlInformationSchema extends Source\AbstractSchemaSource |
||
10 | { |
||
11 | /** |
||
12 | * Schema name |
||
13 | * |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $schema; |
||
17 | |||
18 | /** |
||
19 | * @var MysqlConnectionAdapter |
||
20 | */ |
||
21 | protected $adapter; |
||
22 | |||
23 | |||
24 | |||
25 | /** |
||
26 | * Used to restore innodb stats mysql global variable |
||
27 | * @var string |
||
28 | */ |
||
29 | protected $mysql_innodbstats_value; |
||
30 | |||
31 | /** |
||
32 | * Whether to include full schema options like comment, collations... |
||
33 | * @var boolean |
||
34 | */ |
||
35 | protected $include_options = true; |
||
36 | |||
37 | /** |
||
38 | * |
||
39 | * @var array |
||
40 | */ |
||
41 | protected static $localCache = array(); |
||
42 | |||
43 | |||
44 | /** |
||
45 | * |
||
46 | * @var boolean |
||
47 | */ |
||
48 | protected $useLocalCaching = true; |
||
49 | |||
50 | /** |
||
51 | * |
||
52 | * @var array |
||
53 | */ |
||
54 | protected static $fullyCachedSchemas = array(); |
||
55 | |||
56 | |||
57 | /** |
||
58 | * |
||
59 | * @var Mysql\MysqlDriverInterface |
||
60 | */ |
||
61 | protected $driver; |
||
62 | |||
63 | /** |
||
64 | * Constructor |
||
65 | * |
||
66 | * @param \PDO|\mysqli $connection |
||
67 | * @param string $schema default schema, taken from adapter if not given |
||
68 | * @throws Exception\InvalidArgumentException for invalid connection |
||
69 | * @throws Exception\InvalidUsageException thrown if no schema can be found. |
||
70 | */ |
||
71 | 23 | public function __construct($connection, $schema = null) |
|
92 | |||
93 | |||
94 | /** |
||
95 | * {@inheritdoc} |
||
96 | */ |
||
97 | 1 | public function getUniqueKeys($table, $include_primary = false) |
|
113 | |||
114 | |||
115 | /** |
||
116 | * {@inheritdoc} |
||
117 | */ |
||
118 | public function getIndexesInformation($table) |
||
123 | |||
124 | /** |
||
125 | * {@inheritdoc} |
||
126 | */ |
||
127 | 5 | public function getPrimaryKey($table) |
|
136 | |||
137 | |||
138 | /** |
||
139 | * {@inheritdoc} |
||
140 | */ |
||
141 | 9 | public function getPrimaryKeys($table) |
|
150 | |||
151 | |||
152 | /** |
||
153 | * {@inheritdoc} |
||
154 | */ |
||
155 | 2 | public function getColumnsInformation($table) |
|
160 | |||
161 | |||
162 | /** |
||
163 | * {@inheritdoc} |
||
164 | */ |
||
165 | 1 | public function getForeignKeys($table) |
|
170 | |||
171 | /** |
||
172 | * {@inheritdoc} |
||
173 | */ |
||
174 | 1 | public function getReferences($table) |
|
179 | |||
180 | /** |
||
181 | * {@inheritdoc} |
||
182 | */ |
||
183 | 3 | public function getTablesInformation() |
|
188 | |||
189 | /** |
||
190 | * Get a table configuration |
||
191 | * |
||
192 | * @throws Exception\ErrorException |
||
193 | * @throws Exception\TableNotFoundException |
||
194 | * |
||
195 | * @param string $table table name |
||
196 | * @param boolean|null $include_options include extended information |
||
197 | * @return array |
||
198 | */ |
||
199 | 13 | protected function getTableConfig($table, $include_options = null) |
|
227 | |||
228 | |||
229 | /** |
||
230 | * Get schema configuration |
||
231 | * |
||
232 | * @throws Exception\ErrorException |
||
233 | * @throws Exception\SchemaNotFoundException |
||
234 | * |
||
235 | * @param boolean|null $include_options include extended information |
||
236 | * @return ArrayObject |
||
237 | */ |
||
238 | 2 | public function getSchemaConfig($include_options = null) |
|
258 | |||
259 | |||
260 | |||
261 | |||
262 | /** |
||
263 | * |
||
264 | * @param string $table |
||
265 | * @throws Exception\InvalidArgumentException |
||
266 | * @throws Exception\TableNotFoundException |
||
267 | * |
||
268 | */ |
||
269 | 16 | protected function loadCacheInformation($table = null) |
|
285 | |||
286 | /** |
||
287 | * Clear local cache information for the current schema |
||
288 | * |
||
289 | * @throws Exception\InvalidArgumentException |
||
290 | */ |
||
291 | 1 | public function clearCacheInformation() |
|
301 | } |
||
302 |
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..