73 parent::__construct( $info );
74 '@phan-var array $info';
75 $this->dbType = $info[
'dbType'];
76 $this->dbServer = $info[
'dbServer'];
77 $this->dbUser = $info[
'dbUser'];
78 $this->dbPassword = $info[
'dbPassword'];
79 $this->dbName = $info[
'dbName'];
80 $this->dbFlags = $info[
'dbFlags'];
81 $this->tablePrefix = $info[
'tablePrefix'];
89 if ( !isset( $this->dbConn ) ) {
115 return function ( $index ) use (
$type, $params ) {
116 return Database::factory(
$type, $params );
129 return $this->wanCache->makeGlobalKey( $this->dbDomain, ...
$args );
136 throw new MWException( static::class .
': write operations are not supported.' );
getInfo()
Return information about the repository.
A foreign repository with an accessible MediaWiki database.
getInfo()
Return information about the repository.
assertWritableRepo()
Throw an exception if this repo is read-only by design.
getReplicaDB()
Get a connection to the replica DB.
callable $fileFromRowFactory
getMasterDB()
Get a connection to the master DB.
getSharedCacheKey(... $args)
Get a key on the primary cache for this repository.
A repository that stores files in the local filesystem and registers them in the wiki's own database.
Class to handle database/schema/prefix specifications for IDatabase.