MediaWiki  1.29.0
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. More...
 

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, as, class, DBO_COMPRESS, DBO_DEBUG, DBO_DEFAULT, DBO_SSL, ObjectCache\getLocalClusterInstance(), ConfiguredReadOnlyMode\getReason(), global, Profiler\instance(), 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 class, and wfDeprecated().

Referenced by LBFactoryTest\testGetLBFactoryClass().


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