1 | <?php |
||
15 | class TDBMSchemaAnalyzer |
||
16 | { |
||
17 | |||
18 | private $connection; |
||
19 | |||
20 | /** |
||
21 | * @var Schema |
||
22 | */ |
||
23 | private $schema; |
||
24 | |||
25 | /** |
||
26 | * @var string |
||
27 | */ |
||
28 | private $cachePrefix; |
||
29 | |||
30 | /** |
||
31 | * @var Cache |
||
32 | */ |
||
33 | private $cache; |
||
34 | |||
35 | /** |
||
36 | * @var SchemaAnalyzer |
||
37 | */ |
||
38 | private $schemaAnalyzer; |
||
39 | |||
40 | /** |
||
41 | * @param Connection $connection The DBAL DB connection to use |
||
42 | * @param Cache $cache A cache service to be used |
||
43 | * @param SchemaAnalyzer $schemaAnalyzer The schema analyzer that will be used to find shortest paths... |
||
44 | * Will be automatically created if not passed. |
||
45 | */ |
||
46 | public function __construct(Connection $connection, Cache $cache, SchemaAnalyzer $schemaAnalyzer) { |
||
51 | |||
52 | /** |
||
53 | * Returns a unique ID for the current connection. Useful for namespacing cache entries in the current connection. |
||
54 | * @return string |
||
55 | */ |
||
56 | public function getCachePrefix() { |
||
62 | |||
63 | /** |
||
64 | * Returns the (cached) schema. |
||
65 | * |
||
66 | * @return Schema |
||
67 | */ |
||
68 | public function getSchema() { |
||
80 | |||
81 | /** |
||
82 | * Returns the list of pivot tables linked to table $tableName |
||
83 | * @param string $tableName |
||
84 | * @return array|string[] |
||
85 | */ |
||
86 | public function getPivotTableLinkedToTable($tableName) { |
||
108 | |||
109 | |||
110 | } |
||
111 |