MediaWiki  master
LocalSettingsGenerator Class Reference

Generate the LocalSettings.php file. More...

Collaboration diagram for LocalSettingsGenerator:

Public Member Functions

 __construct (Installer $installer)
 
 getText ()
 Return the full text of the generated LocalSettings.php file, including the extensions and skins. More...
 
 setGroupRights ( $group, $rightsArr)
 For $wgGroupPermissions, set a given ['group']['permission'] value. More...
 
 writeFile ( $fileName)
 Write the generated LocalSettings to a file. More...
 

Static Public Member Functions

static escapePhpString ( $string)
 Returns the escaped version of a string of php code. More...
 

Protected Member Functions

 buildMemcachedServerList ()
 
 getDefaultText ()
 

Protected Attributes

 $dbSettings = ''
 
 $extensions = []
 
 $groupPermissions = []
 
Installer $installer
 
 $IP
 
 $skins = []
 
 $values = []
 

Detailed Description

Generate the LocalSettings.php file.

Since
1.17

Definition at line 27 of file LocalSettingsGenerator.php.

Constructor & Destructor Documentation

◆ __construct()

LocalSettingsGenerator::__construct ( Installer  $installer)

Member Function Documentation

◆ buildMemcachedServerList()

LocalSettingsGenerator::buildMemcachedServerList ( )
protected
Returns
string

Definition at line 218 of file LocalSettingsGenerator.php.

Referenced by getDefaultText().

◆ escapePhpString()

static LocalSettingsGenerator::escapePhpString (   $string)
static

Returns the escaped version of a string of php code.

Parameters
string$string
Returns
string|false

Definition at line 118 of file LocalSettingsGenerator.php.

Referenced by __construct(), getDefaultText(), MysqlInstaller\getLocalSettings(), and SqliteInstaller\getLocalSettings().

◆ getDefaultText()

LocalSettingsGenerator::getDefaultText ( )
protected
Returns
string

Definition at line 239 of file LocalSettingsGenerator.php.

References buildMemcachedServerList(), escapePhpString(), MW_VERSION, and wfBoolToStr().

Referenced by getText().

◆ getText()

LocalSettingsGenerator::getText ( )

Return the full text of the generated LocalSettings.php file, including the extensions and skins.

Returns
string

Definition at line 142 of file LocalSettingsGenerator.php.

References getDefaultText().

Referenced by writeFile().

◆ setGroupRights()

LocalSettingsGenerator::setGroupRights (   $group,
  $rightsArr 
)

For $wgGroupPermissions, set a given ['group']['permission'] value.

Parameters
string$groupGroup name
array$rightsArrAn array of permissions, in the form of: [ 'right' => true, 'right2' => false ]

Definition at line 107 of file LocalSettingsGenerator.php.

◆ writeFile()

LocalSettingsGenerator::writeFile (   $fileName)

Write the generated LocalSettings to a file.

Parameters
string$fileNameFull path to filename to write to

Definition at line 211 of file LocalSettingsGenerator.php.

References getText().

Member Data Documentation

◆ $dbSettings

LocalSettingsGenerator::$dbSettings = ''
protected

Definition at line 33 of file LocalSettingsGenerator.php.

◆ $extensions

LocalSettingsGenerator::$extensions = []
protected

Definition at line 29 of file LocalSettingsGenerator.php.

◆ $groupPermissions

LocalSettingsGenerator::$groupPermissions = []
protected

Definition at line 32 of file LocalSettingsGenerator.php.

◆ $installer

Installer LocalSettingsGenerator::$installer
protected

Definition at line 39 of file LocalSettingsGenerator.php.

Referenced by __construct().

◆ $IP

LocalSettingsGenerator::$IP
protected

Definition at line 34 of file LocalSettingsGenerator.php.

◆ $skins

LocalSettingsGenerator::$skins = []
protected

Definition at line 30 of file LocalSettingsGenerator.php.

◆ $values

LocalSettingsGenerator::$values = []
protected

Definition at line 31 of file LocalSettingsGenerator.php.


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