MediaWiki master
MediaWiki\Settings\WikiFarmSettingsLoader Class Reference

Utility for loading site-specific settings in a multi-tenancy ("wiki farm" or "wiki family") environment. More...

Public Member Functions

 __construct (SettingsBuilder $settingsBuilder)
 
 loadWikiFarmSettings ()
 Loads any site-specific settings in a multi-tenant (wiki-farm) environment.
 

Protected Member Functions

 getWikiNameConstant ()
 Access MW_WIKI_NAME in a way that can be overridden by tests.
 

Detailed Description

Utility for loading site-specific settings in a multi-tenancy ("wiki farm" or "wiki family") environment.

See https://www.mediawiki.org/wiki/Manual:Wiki_family.

This class is designed to be used before the initialization of MediaWiki is complete.

Stability: unstable

Definition at line 15 of file WikiFarmSettingsLoader.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Settings\WikiFarmSettingsLoader::__construct ( SettingsBuilder $settingsBuilder)
Parameters
SettingsBuilder$settingsBuilder

Definition at line 22 of file WikiFarmSettingsLoader.php.

Member Function Documentation

◆ getWikiNameConstant()

MediaWiki\Settings\WikiFarmSettingsLoader::getWikiNameConstant ( )
protected

Access MW_WIKI_NAME in a way that can be overridden by tests.

Returns
string|null

Definition at line 89 of file WikiFarmSettingsLoader.php.

Referenced by MediaWiki\Settings\WikiFarmSettingsLoader\loadWikiFarmSettings().

◆ loadWikiFarmSettings()

MediaWiki\Settings\WikiFarmSettingsLoader::loadWikiFarmSettings ( )

Loads any site-specific settings in a multi-tenant (wiki-farm) environment.

The settings file is expected to be found in the directory identified by the WikiFarmSettingsDirectory config variable. If WikiFarmSettingsDirectory is not set, wiki-farm mode is disabled, and no site-specific settings will be loaded.

The name of the site-specific settings file is determined using the MW_WIKI_NAME environment variable. The file extension is given by WikiFarmSettingsExtension and defaults to "yaml".

Stability: unstable

Definition at line 39 of file WikiFarmSettingsLoader.php.

References $path, MediaWiki\Settings\WikiFarmSettingsLoader\getWikiNameConstant(), MediaWiki\MainConfigNames\WikiFarmSettingsDirectory, and MediaWiki\MainConfigNames\WikiFarmSettingsExtension.


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