Merge "mediawiki.widgets: Remove use of bind() for lexical 'this' binding"
[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
5 * the MediaWiki installer. Altering it is preferred over changing anything in
6 * /includes.
7 *
8 * Note: this file doesn't gets included from a global scope, don't use globals directly.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License along
21 * with this program; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 * http://www.gnu.org/copyleft/gpl.html
24 *
25 * @file
26 */
27
28 /*
29
30 Example of modifications:
31
32 public static function getLocalSettingsGenerator( Installer $installer ) {
33 return new MyLocalSettingsGenerator( $installer );
34 }
35
36 Then add the following to the bottom of this file:
37
38 class MyLocalSettingsGenerator extends LocalSettingsGenerator {
39 function getText() {
40 // Modify an existing setting
41 $this->values['wgDefaultSkin'] = 'vector';
42 // add a new setting
43 $ls = parent::getText();
44 return $ls . "\n\$wgUseTex = true;\n";
45 }
46 }
47 */
48
49 /**
50 * @since 1.20
51 */
52 class InstallerOverrides {
53 /**
54 * Instantiates and returns an instance of LocalSettingsGenerator or its descendant classes
55 * @param Installer $installer
56 * @return LocalSettingsGenerator
57 */
58 public static function getLocalSettingsGenerator( Installer $installer ) {
59 return new LocalSettingsGenerator( $installer );
60 }
61
62 /**
63 * Instantiates and returns an instance of WebInstaller or its descendant classes
64 * @param WebRequest $request
65 * @return WebInstaller
66 */
67 public static function getWebInstaller( WebRequest $request ) {
68 return new WebInstaller( $request );
69 }
70
71 /**
72 * Instantiates and returns an instance of CliInstaller or its descendant classes
73 * @param string $siteName
74 * @param string|null $admin
75 * @param array $options
76 * @return CliInstaller
77 */
78 public static function getCliInstaller( $siteName, $admin = null, array $options = [] ) {
79 return new CliInstaller( $siteName, $admin, $options );
80 }
81 }