MediaWiki REL1_30
MWLBFactory Class Reference

MediaWiki-specific class for generating database load balancers. More...

Static Public Member Functions

static applyDefaultConfig (array $lbConf, Config $mainConfig, ConfiguredReadOnlyMode $readOnlyMode)
 
static getLBFactoryClass (array $config)
 Returns the LBFactory class to use and the load balancer configuration.
 

Detailed Description

MediaWiki-specific class for generating database load balancers.

Definition at line 32 of file MWLBFactory.php.

Member Function Documentation

◆ applyDefaultConfig()

static MWLBFactory::applyDefaultConfig ( array $lbConf,
Config $mainConfig,
ConfiguredReadOnlyMode $readOnlyMode )
static
Parameters
array$lbConfConfig for LBFactory::__construct()
Config$mainConfigMain config object from MediaWikiServices
ConfiguredReadOnlyMode$readOnlyMode
Returns
array

Definition at line 39 of file MWLBFactory.php.

References $flags, $wgCommandLineMode, DBO_COMPRESS, DBO_DEBUG, DBO_DEFAULT, DBO_SSL, ConfiguredReadOnlyMode\getReason(), and wfHostname().

◆ getLBFactoryClass()

static MWLBFactory::getLBFactoryClass ( array $config)
static

Returns the LBFactory class to use and the load balancer configuration.

Todo
instead of this, use a ServiceContainer for managing the different implementations.
Parameters
array$config(e.g. $wgLBFactoryConf)
Returns
string Class name

Definition at line 170 of file MWLBFactory.php.

References wfDeprecated().

Referenced by LBFactoryTest\testGetLBFactoryClass().


The documentation for this class was generated from the following file: