1 | <?php |
||
13 | abstract class Repository |
||
14 | { |
||
15 | |||
16 | /** @var Connection */ |
||
17 | protected $metaConnection; |
||
18 | |||
19 | /** @var Connection */ |
||
20 | protected $projectsConnection; |
||
21 | |||
22 | /** @var Connection */ |
||
23 | protected $toolsConnection; |
||
24 | |||
25 | /** @var MediawikiApi */ |
||
26 | protected $api; |
||
27 | |||
28 | /** @var CacheItemPoolInterface */ |
||
29 | private $cache; |
||
30 | |||
31 | /** |
||
32 | * Set the database connection for the 'meta' database. |
||
33 | * @param Connection $connection |
||
34 | */ |
||
35 | public function setMetaConnection(Connection $connection) |
||
39 | |||
40 | /** |
||
41 | * Set the database connection for the 'projects' database. |
||
42 | * @param Connection $connection |
||
43 | */ |
||
44 | public function setProjectsConnection(Connection $connection) |
||
48 | |||
49 | /** |
||
50 | * Set the database connection for the 'tools' database. |
||
51 | * @param Connection $connection |
||
52 | */ |
||
53 | public function setToolsConnection(Connection $connection) |
||
57 | |||
58 | /** |
||
59 | * @param MediawikiApi $api |
||
60 | */ |
||
61 | public function setApi(MediawikiApi $api) |
||
65 | |||
66 | /** |
||
67 | * Normalize and quote a table name. |
||
68 | * |
||
69 | * @param string $databaseName |
||
70 | * @param string $tableName |
||
71 | * @return string Fully-qualified and quoted table name. |
||
72 | */ |
||
73 | public function getTableName($databaseName, $tableName) |
||
78 | |||
79 | /** |
||
80 | * Set the cache for this repository. |
||
81 | * |
||
82 | * @param CacheItemPoolInterface $pool The cache pool. |
||
83 | */ |
||
84 | public function setCache(CacheItemPoolInterface $pool) |
||
88 | } |
||
89 |