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 | * Whether to include full schema options like comment, collations... |
||
26 | * @var boolean |
||
27 | */ |
||
28 | protected $include_options = true; |
||
29 | |||
30 | /** |
||
31 | * |
||
32 | * @var array |
||
33 | */ |
||
34 | protected static $localCache = array(); |
||
35 | |||
36 | |||
37 | /** |
||
38 | * |
||
39 | * @var boolean |
||
40 | */ |
||
41 | protected $useLocalCaching = true; |
||
42 | |||
43 | /** |
||
44 | * |
||
45 | * @var array |
||
46 | */ |
||
47 | protected static $fullyCachedSchemas = array(); |
||
48 | |||
49 | |||
50 | /** |
||
51 | * |
||
52 | * @var Mysql\MysqlDriverInterface |
||
53 | */ |
||
54 | protected $driver; |
||
55 | |||
56 | /** |
||
57 | * Constructor |
||
58 | * |
||
59 | * @param \PDO|\mysqli $connection |
||
60 | * @param string|null $schema default schema, taken from adapter if not given |
||
61 | * @throws Exception\InvalidArgumentException for invalid connection |
||
62 | * @throws Exception\InvalidUsageException thrown if no schema can be found. |
||
63 | */ |
||
64 | 23 | public function __construct($connection, $schema = null) |
|
85 | |||
86 | |||
87 | /** |
||
88 | * {@inheritdoc} |
||
89 | */ |
||
90 | 1 | public function getUniqueKeys($table, $include_primary = false) |
|
106 | |||
107 | |||
108 | /** |
||
109 | * {@inheritdoc} |
||
110 | */ |
||
111 | public function getIndexesInformation($table) |
||
116 | |||
117 | /** |
||
118 | * {@inheritdoc} |
||
119 | */ |
||
120 | 6 | public function getPrimaryKey($table) |
|
129 | |||
130 | |||
131 | /** |
||
132 | * {@inheritdoc} |
||
133 | */ |
||
134 | 9 | public function getPrimaryKeys($table) |
|
143 | |||
144 | |||
145 | /** |
||
146 | * {@inheritdoc} |
||
147 | */ |
||
148 | 3 | public function getColumnsInformation($table) |
|
153 | |||
154 | |||
155 | /** |
||
156 | * {@inheritdoc} |
||
157 | */ |
||
158 | 1 | public function getForeignKeys($table) |
|
163 | |||
164 | /** |
||
165 | * {@inheritdoc} |
||
166 | */ |
||
167 | 1 | public function getReferences($table) |
|
172 | |||
173 | /** |
||
174 | * {@inheritdoc} |
||
175 | */ |
||
176 | 3 | public function getTablesInformation() |
|
181 | |||
182 | /** |
||
183 | * Get a table configuration |
||
184 | * |
||
185 | * @throws Exception\ErrorException |
||
186 | * @throws Exception\TableNotFoundException |
||
187 | * |
||
188 | * @param string $table table name |
||
189 | * @param boolean|null $include_options include extended information |
||
190 | * @return array |
||
191 | */ |
||
192 | 13 | protected function getTableConfig($table, $include_options = null) |
|
220 | |||
221 | |||
222 | /** |
||
223 | * Get schema configuration |
||
224 | * |
||
225 | * @throws Exception\ErrorException |
||
226 | * @throws Exception\SchemaNotFoundException |
||
227 | * |
||
228 | * @param boolean|null $include_options include extended information |
||
229 | * @return ArrayObject |
||
230 | */ |
||
231 | 2 | public function getSchemaConfig($include_options = null) |
|
251 | |||
252 | /** |
||
253 | * |
||
254 | * @param string $table |
||
255 | * @throws Exception\InvalidArgumentException |
||
256 | * @throws Exception\TableNotFoundException |
||
257 | * |
||
258 | */ |
||
259 | 16 | protected function loadCacheInformation($table = null) |
|
275 | |||
276 | /** |
||
277 | * Clear local cache information for the current schema |
||
278 | * |
||
279 | * @throws Exception\InvalidArgumentException |
||
280 | */ |
||
281 | 1 | public function clearCacheInformation() |
|
291 | } |
||
292 |
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..