Merge "(bug 37301) add sizediff to list=usercontribs"
[lhc/web/wiklou.git] / mw-config / overrides.php
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.
6 *
7 * Note: this file doesn't gets included from a global scope, don't use globals directly.
8 */
9
10 /*
11
12 Example of modifications:
13
14 public static function getLocalSettingsGenerator( Installer $installer ) {
15 return new MyLocalSettingsGenerator( $installer );
16 }
17
18 Then add the following to the bottom of this file:
19
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";
27 }
28 }
29 */
30
31 /**
32 * @since 1.20
33 */
34 class InstallerOverrides {
35 /**
36 * Instantiates and returns an instance of LocalSettingsGenerator or its descendant classes
37 * @param Installer $installer
38 * @return LocalSettingsGenerator
39 */
40 public static function getLocalSettingsGenerator( Installer $installer ) {
41 return new LocalSettingsGenerator( $installer );
42 }
43
44 /**
45 * Instantiates and returns an instance of WebInstaller or its descendant classes
46 * @param WebRequest $request
47 * @return WebInstaller
48 */
49 public static function getWebInstaller( WebRequest $request ) {
50 return new WebInstaller( $request );
51 }
52
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
59 */
60 public static function getCliInstaller( $siteName, $admin = null, array $options = array() ) {
61 return new CliInstaller( $siteName, $admin, $options );
62 }
63 }