dbDomain = $info['wiki']; $this->hasAccessibleSharedCache = $info['hasSharedCache']; } public function getPrimaryDB() { return $this->getDbProvider()->getPrimaryDatabase( $this->dbDomain ); } public function getReplicaDB() { return $this->getDbProvider()->getReplicaDatabase( $this->dbDomain ); } /** * @return Closure */ protected function getDBFactory() { return function ( $index ) { if ( $index == DB_PRIMARY ) { return $this->getDbProvider()->getPrimaryDatabase( $this->dbDomain ); } else { return $this->getDbProvider()->getReplicaDatabase( $this->dbDomain ); } }; } /** * @return IConnectionProvider */ protected function getDbProvider(): IConnectionProvider { return MediaWikiServices::getInstance()->getConnectionProvider(); } /** * @return never */ protected function assertWritableRepo() { throw new LogicException( static::class . ': write operations are not supported.' ); } public function getInfo() { return FileRepo::getInfo(); } }