18 private $settingsBuilder;
24 $this->settingsBuilder = $settingsBuilder;
41 $config = $this->settingsBuilder->getConfig();
52 if ( $wikiName !==
null ) {
56 } elseif ( isset( $_SERVER[
'MW_WIKI_NAME'] ) ) {
61 $site = $_SERVER[
'MW_WIKI_NAME'];
62 } elseif ( isset( $_SERVER[
'WIKI_NAME'] ) ) {
66 $site = $_SERVER[
'WIKI_NAME'];
70 'The WIKI_NAME server variable has been deprecated since 1.39, ' .
71 'use MW_WIKI_NAME instead.'
79 $path =
"$farmDir/$site.$farmExt";
80 if ( $this->settingsBuilder->fileExists(
$path ) ) {
81 $this->settingsBuilder->loadFile(
$path );
91 return defined(
'MW_WIKI_NAME' ) ? MW_WIKI_NAME :
null;
A class containing constants representing the names of configuration variables.
const WikiFarmSettingsExtension
Name constant for the WikiFarmSettingsExtension setting, for use with Config::get()
const WikiFarmSettingsDirectory
Name constant for the WikiFarmSettingsDirectory setting, for use with Config::get()