Merge "(bug 38281) Fix grammar in the UPGRADE file"
[mediawiki.git] / mw-config / overrides.php
blobae982951221544635e173a92f04f24b73d2120ec
1 <?php
2 /**
3 * MediaWiki installer overrides.
4 * Modify this file if you are a packager who needs to modify the behavior of the MediaWiki installer.
5 * Altering it is preferred over changing anything in /includes.
7 * Note: this file doesn't gets included from a global scope, don't use globals directly.
8 */
12 Example of modifications:
14 public static function getLocalSettingsGenerator( Installer $installer ) {
15 return new MyLocalSettingsGenerator( $installer );
18 Then add the following to the bottom of this file:
20 class MyLocalSettingsGenerator extends LocalSettingsGenerator {
21 function getText() {
22 // Modify an existing setting
23 $this->values['wgResourceLoaderMaxQueryLength'] = 512;
24 // add a new setting
25 $ls = parent::getText();
26 return $ls . "\n\$wgUseTex = true;\n";
31 /**
32 * @since 1.20
34 class InstallerOverrides {
35 /**
36 * Instantiates and returns an instance of LocalSettingsGenerator or its descendant classes
37 * @param Installer $installer
38 * @return LocalSettingsGenerator
40 public static function getLocalSettingsGenerator( Installer $installer ) {
41 return new LocalSettingsGenerator( $installer );
44 /**
45 * Instantiates and returns an instance of WebInstaller or its descendant classes
46 * @param WebRequest $request
47 * @return WebInstaller
49 public static function getWebInstaller( WebRequest $request ) {
50 return new WebInstaller( $request );
53 /**
54 * Instantiates and returns an instance of CliInstaller or its descendant classes
55 * @param string $siteName
56 * @param string|null $admin
57 * @param array $options
58 * @return CliInstaller
60 public static function getCliInstaller( $siteName, $admin = null, array $options = array() ) {
61 return new CliInstaller( $siteName, $admin, $options );