MediaWiki master
|
Class for the core installer command line interface. More...
Inherits MediaWiki\Installer\Installer.
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. | |
endStage ( $task, $status) | |
envCheckPath () | |
Environment check to inform user which paths we've assumed. | |
execute () | |
Main entry point. | |
showError ( $msg,... $params) | |
Display an error message. | |
showMessage ( $msg,... $params) | |
Display a short neutral message. | |
showStatusMessage (Status $status) | |
Show a message to the installing user by using a Status object. | |
showSuccess ( $msg,... $params) | |
Display a success message. | |
showWarning ( $msg,... $params) | |
Display a warning message. | |
startStage ( $task) | |
writeConfigurationFile ( $path) | |
Write LocalSettings.php to a given path. | |
![]() | |
__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() | |
formatMessage ( $message) | |
getMessageText ( $msg, $params) | |
![]() | |
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 | 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. | |
![]() | |
array | $licenses |
License types. | |
array | $rightsProfiles |
User rights profiles. | |
![]() | |
HookContainer null | $autoExtensionHookContainer |
array | $compiledDBs |
List of detected DBs, access using getCompiledDBs(). | |
array | $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 array | $dbTypes |
Known database types. | |
Class for the core installer command line interface.
Definition at line 41 of file CliInstaller.php.
MediaWiki\Installer\CliInstaller::__construct | ( | $siteName, | |
$admin = null, | |||
array | $options = [] ) |
string | $siteName | |
string | null | $admin | |
array | $options |
InstallException |
Definition at line 67 of file CliInstaller.php.
References $wgLang, $wgLanguageCode, $wgPasswordPolicy, MediaWiki\Installer\Installer\findExtensions(), MediaWiki\Installer\Installer\getDefaultSkin(), MediaWiki\MediaWikiServices\getInstance(), MediaWiki\Installer\Installer\getVar(), and MediaWiki\Installer\Installer\setVar().
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.
string | $dir | |
string | $url |
Reimplemented from MediaWiki\Installer\Installer.
Definition at line 334 of file CliInstaller.php.
MediaWiki\Installer\CliInstaller::endStage | ( | $task, | |
$status ) |
Task | $task | |
Status | $status |
Definition at line 259 of file CliInstaller.php.
MediaWiki\Installer\CliInstaller::envCheckPath | ( | ) |
Environment check to inform user which paths we've assumed.
Reimplemented from MediaWiki\Installer\Installer.
Definition at line 321 of file CliInstaller.php.
|
protected |
Helper function to be called from getDefaultSettings()
Reimplemented from MediaWiki\Installer\Installer.
Definition at line 329 of file CliInstaller.php.
MediaWiki\Installer\CliInstaller::execute | ( | ) |
Main entry point.
Definition at line 209 of file CliInstaller.php.
References MediaWiki\Installer\Installer\getExistingLocalSettings().
|
protected |
|
protected |
string | MessageSpecifier | $msg | |
(string|int|float)[] | $params Message parameters |
Definition at line 297 of file CliInstaller.php.
References wfMessage().
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.
string | MessageSpecifier | $msg | |
string|int|float | ...$params Message parameters |
Reimplemented from MediaWiki\Installer\Installer.
Definition at line 286 of file CliInstaller.php.
MediaWiki\Installer\CliInstaller::showMessage | ( | $msg, | |
$params ) |
Display a short neutral message.
string | MessageSpecifier | $msg | String 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 268 of file CliInstaller.php.
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 311 of file CliInstaller.php.
References StatusValue\getMessages().
MediaWiki\Installer\CliInstaller::showSuccess | ( | $msg, | |
$params ) |
Display a success message.
string | MessageSpecifier | $msg | String 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 274 of file CliInstaller.php.
MediaWiki\Installer\CliInstaller::showWarning | ( | $msg, | |
$params ) |
Display a warning message.
string | MessageSpecifier | $msg | String 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 280 of file CliInstaller.php.
MediaWiki\Installer\CliInstaller::startStage | ( | $task | ) |
Task | $task |
Definition at line 250 of file CliInstaller.php.
MediaWiki\Installer\CliInstaller::writeConfigurationFile | ( | $path | ) |
Write LocalSettings.php to a given path.
string | $path | Full path to write LocalSettings.php to |
Definition at line 242 of file CliInstaller.php.
References MediaWiki\Installer\InstallerOverrides\getLocalSettingsGenerator().