MediaWiki
1.30.2
|
Class for generating LocalSettings.php file. More...
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 | |
$values = [] | |
Private Member Functions | |
generateExtEnableLine ( $dir, $name) | |
Generate the appropriate line to enable the given extension or skin. More... | |
Class for generating LocalSettings.php file.
Definition at line 30 of file LocalSettingsGenerator.php.
LocalSettingsGenerator::__construct | ( | Installer | $installer | ) |
Installer | $installer |
Definition at line 46 of file LocalSettingsGenerator.php.
References $installer, as, escapePhpString(), extensions, Installer\getDBInstaller(), Installer\getVar(), skins, values, and wfBoolToStr().
|
protected |
Definition at line 212 of file LocalSettingsGenerator.php.
References $ret, as, and values.
Referenced by getDefaultText().
|
static |
Returns the escaped version of a string of php code.
string | $string |
Definition at line 112 of file LocalSettingsGenerator.php.
Referenced by __construct(), generateExtEnableLine(), getDefaultText(), SqliteInstaller\getLocalSettings(), MysqlInstaller\getLocalSettings(), and MssqlInstaller\getLocalSettings().
|
private |
Generate the appropriate line to enable the given extension or skin.
string | $dir | Either "extensions" or "skins" |
string | $name | Name of extension/skin |
InvalidArgumentException |
Definition at line 180 of file LocalSettingsGenerator.php.
References $dir, $name, and escapePhpString().
Referenced by getText().
|
protected |
Definition at line 233 of file LocalSettingsGenerator.php.
References as, buildMemcachedServerList(), escapePhpString(), values, and wfBoolToStr().
Referenced by getText().
LocalSettingsGenerator::getText | ( | ) |
Return the full text of the generated LocalSettings.php file, including the extensions and skins.
Definition at line 136 of file LocalSettingsGenerator.php.
References as, captcha-old\count, extensions, generateExtEnableLine(), getDefaultText(), and skins.
Referenced by writeFile().
LocalSettingsGenerator::setGroupRights | ( | $group, | |
$rightsArr | |||
) |
For $wgGroupPermissions, set a given ['group']['permission'] value.
string | $group | Group name |
array | $rightsArr | An array of permissions, in the form of: [ 'right' => true, 'right2' => false ] |
Definition at line 101 of file LocalSettingsGenerator.php.
LocalSettingsGenerator::writeFile | ( | $fileName | ) |
Write the generated LocalSettings to a file.
string | $fileName | Full path to filename to write to |
Definition at line 205 of file LocalSettingsGenerator.php.
References getText().
|
protected |
Definition at line 35 of file LocalSettingsGenerator.php.
|
protected |
Definition at line 32 of file LocalSettingsGenerator.php.
|
protected |
Definition at line 34 of file LocalSettingsGenerator.php.
|
protected |
Definition at line 41 of file LocalSettingsGenerator.php.
Referenced by __construct().
|
protected |
Definition at line 36 of file LocalSettingsGenerator.php.
|
protected |
Definition at line 33 of file LocalSettingsGenerator.php.