MediaWiki fundraising/REL1_35
InstallerOverrides.php
Go to the documentation of this file.
1<?php
27 private static function getOverrides() {
28 global $IP;
29 static $overrides;
30
31 if ( !$overrides ) {
32 $overrides = [
33 'LocalSettingsGenerator' => LocalSettingsGenerator::class,
34 'WebInstaller' => WebInstaller::class,
35 'CliInstaller' => CliInstaller::class,
36 ];
37 foreach ( glob( "$IP/mw-config/overrides/*.php" ) as $file ) {
38 require $file;
39 }
40 }
41
42 return $overrides;
43 }
44
50 public static function getLocalSettingsGenerator( Installer $installer ) {
51 $className = self::getOverrides()['LocalSettingsGenerator'];
52 return new $className( $installer );
53 }
54
60 public static function getWebInstaller( WebRequest $request ) {
61 $className = self::getOverrides()['WebInstaller'];
62 return new $className( $request );
63 }
64
72 public static function getCliInstaller( $siteName, $admin = null, array $options = [] ) {
73 $className = self::getOverrides()['CliInstaller'];
74 return new $className( $siteName, $admin, $options );
75 }
76}
static getCliInstaller( $siteName, $admin=null, array $options=[])
Instantiates and returns an instance of CliInstaller or its descendant classes.
static getWebInstaller(WebRequest $request)
Instantiates and returns an instance of WebInstaller or its descendant classes.
static getLocalSettingsGenerator(Installer $installer)
Instantiates and returns an instance of LocalSettingsGenerator or its descendant classes.
Base installer class.
Definition Installer.php:54
The WebRequest class encapsulates getting at data passed in the URL or via a POSTed form stripping il...
$IP
Definition rebuild.php:19
if(PHP_SAPI !='cli-server') if(!isset( $_SERVER['SCRIPT_FILENAME'])) $file
Item class for a filearchive table row.
Definition router.php:42