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