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 ( $step, $status) | |
envCheckPath () | |
Environment check to inform user which paths we've assumed. | |
execute () | |
Main entry point. | |
showError ( $msg,... $params) | |
Same as showMessage(), but for displaying errors. | |
showHelpBox ( $msg,... $params) | |
Dummy. | |
showMessage ( $msg,... $params) | |
UI interface for displaying a short message The parameters are like parameters to wfMessage(). | |
showStatusMessage (Status $status) | |
Show a message to the installing user by using a Status object. | |
startStage ( $step) | |
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. | |
doEnvironmentPreps () | |
findExtensions ( $directory='extensions') | |
Find extensions or skins in a subdirectory of $IP. | |
generateKeys () | |
Generate $wgSecretKey. | |
getAutoExtensionHookContainer () | |
Get the hook container previously populated by includeExtensions(). | |
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. | |
getVirtualDomains () | |
Get the virtual domains. | |
parse ( $text, $lineStart=false) | |
Convert wikitext $text to HTML. | |
performInstallation ( $startCB, $endCB) | |
Actually perform the installation. | |
populateSiteStats (DatabaseInstaller $installer) | |
Install step which adds a row to the site_stats table with appropriate initial values. | |
resetMediaWikiServices (?Config $installerConfig=null, $serviceOverrides=[], bool $disableStorage=false) | |
Reset the global service container and associated global state to accommodate different stages of the installation. | |
restoreLinkPopups () | |
restoreServices () | |
Restore services that have been redefined in the early stage of installation. | |
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 envPrepServer() | |
getMessageText ( $msg, $params) | |
Protected Member Functions inherited from MediaWiki\Installer\Installer | |
createMainpage (DatabaseInstaller $installer) | |
Insert Main Page with default content. | |
createSysop () | |
Create the first user account, grant it sysop, bureaucrat and interface-admin rights. | |
disableTimeLimit () | |
Disable the time limit for execution. | |
doGenerateKeys ( $keys) | |
Generate a secret value for variables using a secure generator. | |
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 () | |
envPrepPath () | |
Environment prep for setting $IP and $wgScriptPath. | |
envPrepServer () | |
Environment prep for the server hostname. | |
findExtensionsByType ( $type='extension', $directory='extensions') | |
Find extensions or skins, and return an array containing the value for 'Name' for each found extension. | |
getAutoExtensionData () | |
Auto-detect extensions with an extension.json file. | |
getAutoExtensionLegacyHooks () | |
Auto-detect extensions with an old style .php registration file, load the extensions, and return the merged $wgHooks array. | |
getDocUrl ( $page) | |
Overridden by WebInstaller to provide lastPage parameters. | |
getExtensionInfo ( $type, $parentRelPath, $name) | |
getInstallSteps (DatabaseInstaller $installer) | |
Get an array of install steps. | |
includeExtensionFiles ( $files) | |
Include the specified extension PHP files. | |
includeExtensions () | |
Installs the auto-detected extensions. | |
Additional Inherited Members | |
Static Public Member Functions inherited from MediaWiki\Installer\Installer | |
static | apacheModulePresent ( $moduleName) |
Checks for presence of an Apache module. | |
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 | maybeGetWebserverPrimaryGroup () |
On POSIX systems return the primary group of the webserver we're running under. | |
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 |
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 | $envPreps |
A list of environment preparation methods called by doEnvironmentPreps(). | |
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. | |
Class for the core installer command line interface.
Definition at line 39 of file CliInstaller.php.
MediaWiki\Installer\CliInstaller::__construct | ( | $siteName, | |
$admin = null, | |||
array | $options = [] ) |
string | $siteName | |
string | null | $admin | |
array | $options |
InstallException |
Definition at line 65 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 315 of file CliInstaller.php.
References MediaWiki\Installer\CliInstaller\showMessage().
MediaWiki\Installer\CliInstaller::endStage | ( | $step, | |
$status ) |
Definition at line 250 of file CliInstaller.php.
References MediaWiki\Installer\CliInstaller\showError(), MediaWiki\Installer\CliInstaller\showMessage(), and MediaWiki\Installer\CliInstaller\showStatusMessage().
MediaWiki\Installer\CliInstaller::envCheckPath | ( | ) |
Environment check to inform user which paths we've assumed.
Reimplemented from MediaWiki\Installer\Installer.
Definition at line 302 of file CliInstaller.php.
References MediaWiki\Installer\Installer\getVar(), and MediaWiki\Installer\CliInstaller\showMessage().
|
protected |
Helper function to be called from envPrepServer()
Reimplemented from MediaWiki\Installer\Installer.
Definition at line 310 of file CliInstaller.php.
MediaWiki\Installer\CliInstaller::execute | ( | ) |
Main entry point.
Definition at line 202 of file CliInstaller.php.
References MediaWiki\Installer\Installer\getExistingLocalSettings(), MediaWiki\Installer\Installer\getVar(), MediaWiki\Installer\Installer\performInstallation(), MediaWiki\Installer\Installer\setVar(), and MediaWiki\Installer\CliInstaller\showStatusMessage().
|
protected |
string | MessageSpecifier | $msg | |
array | $params |
Definition at line 276 of file CliInstaller.php.
References $params, and wfMessage().
Referenced by MediaWiki\Installer\CliInstaller\showMessage().
MediaWiki\Installer\CliInstaller::showError | ( | $msg, | |
$params ) |
Same as showMessage(), but for displaying errors.
string | MessageSpecifier | $msg | |
mixed | ...$params |
Reimplemented from MediaWiki\Installer\Installer.
Definition at line 265 of file CliInstaller.php.
Referenced by MediaWiki\Installer\CliInstaller\endStage().
MediaWiki\Installer\CliInstaller::showHelpBox | ( | $msg, | |
$params ) |
Dummy.
string | $msg | Key for wfMessage() |
mixed | ...$params |
Definition at line 289 of file CliInstaller.php.
MediaWiki\Installer\CliInstaller::showMessage | ( | $msg, | |
$params ) |
UI interface for displaying a short message The parameters are like parameters to wfMessage().
The messages will be in wikitext format, which will be converted to an output format such as HTML or text before being sent to the user.
string | MessageSpecifier | $msg | |
mixed | ...$params |
Reimplemented from MediaWiki\Installer\Installer.
Definition at line 259 of file CliInstaller.php.
References $params, and MediaWiki\Installer\CliInstaller\getMessageText().
Referenced by MediaWiki\Installer\CliInstaller\dirIsExecutable(), MediaWiki\Installer\CliInstaller\endStage(), MediaWiki\Installer\CliInstaller\envCheckPath(), MediaWiki\Installer\CliInstaller\showStatusMessage(), and MediaWiki\Installer\CliInstaller\startStage().
MediaWiki\Installer\CliInstaller::showStatusMessage | ( | Status | $status | ) |
Show a message to the installing user by using a Status object.
Status | $status |
Reimplemented from MediaWiki\Installer\Installer.
Definition at line 292 of file CliInstaller.php.
References StatusValue\getMessages(), and MediaWiki\Installer\CliInstaller\showMessage().
Referenced by MediaWiki\Installer\CliInstaller\endStage(), and MediaWiki\Installer\CliInstaller\execute().
MediaWiki\Installer\CliInstaller::startStage | ( | $step | ) |
Definition at line 243 of file CliInstaller.php.
References MediaWiki\Installer\CliInstaller\showMessage().
MediaWiki\Installer\CliInstaller::writeConfigurationFile | ( | $path | ) |
Write LocalSettings.php to a given path.
string | $path | Full path to write LocalSettings.php to |
Definition at line 238 of file CliInstaller.php.
References MediaWiki\Installer\InstallerOverrides\getLocalSettingsGenerator().