MediaWiki REL1_41
|
Functions that need to be available during bootstrapping. More...
Go to the source code of this file.
Functions | |
wfDetectInstallPath () | |
Decide and remember where mediawiki is installed. | |
wfDetectLocalSettingsFile (?string $installationPath=null) | |
Decide and remember where to load LocalSettings from. | |
wfIsCLI () | |
Check if we are running from the commandline. | |
wfIsWindows () | |
Check if the operating system is Windows. | |
Functions that need to be available during bootstrapping.
Code in this file cannot expect MediaWiki to have been initialized.
Definition in file BootstrapHelperFunctions.php.
wfDetectInstallPath | ( | ) |
Decide and remember where mediawiki is installed.
This is used by Setup.php and will (if not already) store the result in the MW_INSTALL_PATH constant.
The install path is detected based on the location of this file, but can be overwritten using the MW_INSTALL_PATH environment variable.
Definition at line 68 of file BootstrapHelperFunctions.php.
References $IP.
Referenced by Installer\getExistingLocalSettings().
wfDetectLocalSettingsFile | ( | ?string | $installationPath = null | ) |
Decide and remember where to load LocalSettings from.
This is used by Setup.php and will (if not already) store the result in the MW_CONFIG_FILE constant.
The primary settings file is traditionally LocalSettings.php under the MediaWiki installation path, but can also be placed differently and specified via the MW_CONFIG_FILE constant (from an entrypoint wrapper) or via a MW_CONFIG_FILE
environment variable (from the web server).
Experimental: The settings file can use the .yaml
or .json
extension, which must use the format described on https://www.mediawiki.org/wiki/Manual:YAML_settings_file_format.
string | null | $installationPath | The installation's base path, as returned by wfDetectInstallPath(). |
Definition at line 30 of file BootstrapHelperFunctions.php.
Referenced by MediaWiki\Maintenance\MaintenanceRunner\defineSettings(), and Installer\getExistingLocalSettings().
wfIsCLI | ( | ) |
Check if we are running from the commandline.
Definition at line 95 of file BootstrapHelperFunctions.php.
Referenced by MediaWiki\Maintenance\ForkController\__construct(), MediaWiki\Logger\Monolog\WikiProcessor\__invoke(), MWExceptionHandler\handleUncaughtException(), and ProfilerOutputText\log().
wfIsWindows | ( | ) |
Check if the operating system is Windows.
Definition at line 85 of file BootstrapHelperFunctions.php.
Referenced by Installer\envCheckDiff3(), Installer\envCheckGit(), Installer\envCheckGraphics(), TransformationalImageHandler\escapeMagickPath(), RebuildLocalisationCache\execute(), Maintenance\getTermSize(), UserMailer\sendInternal(), SevenZipStream\stream_open(), MailAddress\toString(), wfGetNull(), and CLIParser\Wikitext().