MediaWiki master
MediaWiki\Installer\CliInstaller Class Reference

Class for the core installer command line interface. More...

Inherits MediaWiki\Installer\Installer.

Collaboration diagram for MediaWiki\Installer\CliInstaller:

Public Member Functions

 __construct ( $siteName, $admin=null, array $options=[])
 
 dirIsExecutable ( $dir, $url)
 Checks if scripts located in the given directory can be executed via the given URL.Used only by environment checks.

Parameters
string$dir
string$url
Returns
bool|int|string

 
 endStage ( $task, $status)
 
 envCheckPath ()
 Environment check to inform user which paths we've assumed.
Returns
bool

 
 execute ()
 Main entry point.
 
 showError ( $msg,... $params)
 Display an error message.Avoid error fatigue in the installer. Use this only if something the user expects has failed and requires intervention to continue. If something non-essential failed that can be continued past with no action, use a warning instead.
Parameters
string | MessageSpecifier$msg
string|int|float...$params Message parameters

 
 showMessage ( $msg,... $params)
 Display a short neutral message.
Parameters
string | MessageSpecifier$msgString of wikitext that will be converted to HTML, or interface message that will be parsed.
string|int|float...$params Message parameters, same as wfMessage().

 
 showStatusMessage (Status $status)
 Show a message to the installing user by using a Status object.
 
 showSuccess ( $msg,... $params)
 Display a success message.
Parameters
string | MessageSpecifier$msgString of wikitext that will be converted to HTML, or interface message that will be parsed.
string|int|float...$params Message parameters, same as wfMessage().

 
 showWarning ( $msg,... $params)
 Display a warning message.
Parameters
string | MessageSpecifier$msgString of wikitext that will be converted to HTML, or interface message that will be parsed.
string|int|float...$params Message parameters, same as wfMessage().

 
 startStage ( $task)
 
 writeConfigurationFile ( $path)
 Write LocalSettings.php to a given path.
 
- Public Member Functions inherited from MediaWiki\Installer\Installer
 __construct ()
 Constructor, always call this from child classes.
 
 addInstallStep ( $callback, $findStep='BEGINNING')
 Add an installation step following the given step.
 
 disableLinkPopups ()
 
 doEnvironmentChecks ()
 Do initial checks of the PHP environment.
 
 findExtensions ( $directory='extensions')
 Find extensions or skins in a subdirectory of $IP.
 
 getCompiledDBs ()
 Get a list of DBs supported by current PHP setup.
 
 getDBInstaller ( $type=false)
 Get an instance of DatabaseInstaller for the specified DB type.
 
 getDefaultSkin (array $skinNames)
 Returns a default value to be used for $wgDefaultSkin: normally the DefaultSkin from config-schema.yaml, but will fall back to another if the default skin is missing and some other one is present instead.
 
 getFakePassword ( $realPassword)
 Get a fake password for sending back to the user in HTML.
 
 getParserOptions ()
 
 getVar ( $name, $default=null)
 Get an MW configuration variable, or internal installer configuration variable.
 
 parse ( $text, $lineStart=false)
 Convert wikitext $text to HTML.
 
 performInstallation ( $startCB, $endCB)
 Actually perform the installation.
 
 restoreLinkPopups ()
 
 setParserLanguage ( $lang)
 ParserOptions are constructed before we determined the language, so fix it.
 
 setPassword ( $name, $value)
 Set a variable which stores a password, except if the new value is a fake password in which case leave it as it is.
 
 setVar ( $name, $value)
 Set a MW configuration variable, or internal installer configuration variable.
 

Protected Member Functions

 envGetDefaultServer ()
 Helper function to be called from getDefaultSettings()
Returns
string

 
 formatMessage ( $message)
 
 getMessageText ( $msg, $params)
 
- Protected Member Functions inherited from MediaWiki\Installer\Installer
 detectWebPaths ()
 This is overridden by the web installer to provide the detected wgScriptPath.
 
 disableTimeLimit ()
 Disable the time limit for execution.
 
 envCheck64Bit ()
 Checks if we're running on 64 bit or not.
 
 envCheckCache ()
 Environment check for compiled object cache types.
 
 envCheckDB ()
 Environment check for DB types.
 
 envCheckDiff3 ()
 Search for GNU diff3.
 
 envCheckGit ()
 Search for git.
 
 envCheckGraphics ()
 Environment check for ImageMagick and GD.
 
 envCheckLibicu ()
 Check and display the libicu and Unicode versions.
 
 envCheckMemory ()
 Environment check for available memory.
 
 envCheckModSecurity ()
 Scare user to death if they have mod_security or mod_security2.
 
 envCheckPCRE ()
 Check for known PCRE-related compatibility issues.
 
 envCheckServer ()
 Environment check to inform user which server we've assumed.
 
 envCheckUploadsDirectory ()
 Environment check for the permissions of the uploads directory.
 
 envCheckUploadsServerResponse ()
 
 findExtensionsByType ( $type='extension', $directory='extensions')
 Find extensions or skins, and return an array containing the value for 'Name' for each found extension.
 
 getDefaultSettingsOverrides ()
 Override this in a subclass to override the default settings.
 
 getDocUrl ( $page)
 Overridden by WebInstaller to provide lastPage parameters.
 
 getExtensionInfo ( $type, $parentRelPath, $name)
 
 getTaskFactory ()
 
 getTaskList ()
 Get a list of tasks to do.
 

Additional Inherited Members

- Static Public Member Functions inherited from MediaWiki\Installer\Installer
static apacheModulePresent ( $moduleName)
 Checks for presence of an Apache module.
 
static disableStorage (Config $config, string $lang)
 Reset the global service container and associated global state, disabling storage, to support pre-installation operation.
 
static getDBInstallerClass ( $type)
 Get the DatabaseInstaller class name for this type.
 
static getDBTypes ()
 Get a list of known DB types.
 
static getExistingLocalSettings ()
 Determine if LocalSettings.php exists.
 
static getInstallerConfig (Config $baseConfig)
 Constructs a Config object that contains configuration settings that should be overwritten for the installation process.
 
static overrideConfig (SettingsBuilder $settings)
 Override the necessary bits of the config to run an installation.
 
- Public Attributes inherited from MediaWiki\Installer\Installer
array $licenses
 License types.
 
array $rightsProfiles
 User rights profiles.
 
- Protected Attributes inherited from MediaWiki\Installer\Installer
HookContainer null $autoExtensionHookContainer
 
string[] $compiledDBs
 List of detected DBs, access using getCompiledDBs().
 
array< string, DatabaseInstaller$dbInstallers = []
 Cached DB installer instances, access using getDBInstaller().
 
array $envChecks
 A list of environment check methods called by doEnvironmentChecks().
 
array $extraInstallSteps = []
 Extra steps for installation, for things like DatabaseInstallers to modify.
 
array $internalDefaults
 Variables that are stored alongside globals, and are used for any configuration of the installation process aside from the MediaWiki configuration.
 
int $minMemorySize = 50
 Minimum memory size in MiB.
 
array $objectCaches
 Known object cache types and the functions used to test for their existence.
 
ParserOptions $parserOptions
 Cached ParserOptions, used by parse().
 
Title $parserTitle
 Cached Title, used by parse().
 
array $settings
 
array $virtualDomains = []
 
- Static Protected Attributes inherited from MediaWiki\Installer\Installer
static array $dbTypes
 Known database types.
 

Detailed Description

Class for the core installer command line interface.

Since
1.17

Definition at line 27 of file CliInstaller.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Installer\CliInstaller::__construct ( $siteName,
$admin = null,
array $options = [] )

Member Function Documentation

◆ dirIsExecutable()

MediaWiki\Installer\CliInstaller::dirIsExecutable ( $dir,
$url )

Checks if scripts located in the given directory can be executed via the given URL.Used only by environment checks.

Parameters
string$dir
string$url
Returns
bool|int|string

Reimplemented from MediaWiki\Installer\Installer.

Definition at line 327 of file CliInstaller.php.

◆ endStage()

MediaWiki\Installer\CliInstaller::endStage ( $task,
$status )
Parameters
Task$task
Status$status

Definition at line 245 of file CliInstaller.php.

◆ envCheckPath()

MediaWiki\Installer\CliInstaller::envCheckPath ( )

Environment check to inform user which paths we've assumed.

Returns
bool

Reimplemented from MediaWiki\Installer\Installer.

Definition at line 312 of file CliInstaller.php.

◆ envGetDefaultServer()

MediaWiki\Installer\CliInstaller::envGetDefaultServer ( )
protected

Helper function to be called from getDefaultSettings()

Returns
string

Reimplemented from MediaWiki\Installer\Installer.

Definition at line 321 of file CliInstaller.php.

◆ execute()

MediaWiki\Installer\CliInstaller::execute ( )

Main entry point.

Returns
Status

Definition at line 195 of file CliInstaller.php.

References MediaWiki\Installer\Installer\getExistingLocalSettings().

◆ formatMessage()

MediaWiki\Installer\CliInstaller::formatMessage ( $message)
protected
Parameters
Message$message
Returns
string

Definition at line 295 of file CliInstaller.php.

◆ getMessageText()

MediaWiki\Installer\CliInstaller::getMessageText ( $msg,
$params )
protected
Parameters
string | MessageSpecifier$msg
(string|int|float)[]$params Message parameters
Returns
string

Definition at line 287 of file CliInstaller.php.

References wfMessage().

◆ showError()

MediaWiki\Installer\CliInstaller::showError ( $msg,
$params )

Display an error message.Avoid error fatigue in the installer. Use this only if something the user expects has failed and requires intervention to continue. If something non-essential failed that can be continued past with no action, use a warning instead.

Parameters
string | MessageSpecifier$msg
string|int|float...$params Message parameters

Reimplemented from MediaWiki\Installer\Installer.

Definition at line 276 of file CliInstaller.php.

◆ showMessage()

MediaWiki\Installer\CliInstaller::showMessage ( $msg,
$params )

Display a short neutral message.

Parameters
string | MessageSpecifier$msgString of wikitext that will be converted to HTML, or interface message that will be parsed.
string|int|float...$params Message parameters, same as wfMessage().

Reimplemented from MediaWiki\Installer\Installer.

Definition at line 255 of file CliInstaller.php.

◆ showStatusMessage()

MediaWiki\Installer\CliInstaller::showStatusMessage ( Status $status)

Show a message to the installing user by using a Status object.

Reimplemented from MediaWiki\Installer\Installer.

Definition at line 301 of file CliInstaller.php.

References StatusValue\getMessages().

◆ showSuccess()

MediaWiki\Installer\CliInstaller::showSuccess ( $msg,
$params )

Display a success message.

Parameters
string | MessageSpecifier$msgString of wikitext that will be converted to HTML, or interface message that will be parsed.
string|int|float...$params Message parameters, same as wfMessage().

Reimplemented from MediaWiki\Installer\Installer.

Definition at line 262 of file CliInstaller.php.

◆ showWarning()

MediaWiki\Installer\CliInstaller::showWarning ( $msg,
$params )

Display a warning message.

Parameters
string | MessageSpecifier$msgString of wikitext that will be converted to HTML, or interface message that will be parsed.
string|int|float...$params Message parameters, same as wfMessage().

Reimplemented from MediaWiki\Installer\Installer.

Definition at line 269 of file CliInstaller.php.

◆ startStage()

MediaWiki\Installer\CliInstaller::startStage ( $task)
Parameters
Task$task

Definition at line 236 of file CliInstaller.php.

◆ writeConfigurationFile()

MediaWiki\Installer\CliInstaller::writeConfigurationFile ( $path)

Write LocalSettings.php to a given path.

Parameters
string$pathFull path to write LocalSettings.php to

Definition at line 228 of file CliInstaller.php.

References MediaWiki\Installer\InstallerOverrides\getLocalSettingsGenerator().


The documentation for this class was generated from the following file: