|
MediaWiki master
|
The setup for all MediaWiki processes (both web-based and CLI). More...
Go to the source code of this file.
Variables | |
| if(!defined('MW_NO_SESSION_HANDLER')) if(defined( 'MW_SETUP_CALLBACK')) | $dynamicDefaults = new DynamicDefaultValues( $wgSettings->getConfigSchema() ) |
| Customization point after most things are loaded (constants, functions, classes, LocalSettings. | |
| if(!defined('MEDIAWIKI')) if(!defined( 'MW_ENTRY_POINT')) | $IP = wfDetectInstallPath() |
| Environment checks. | |
| $settingsWarnings = $wgSettings->getWarnings() | |
| $wgAutoloadClasses = [] | |
| if(!interface_exists(LoggerInterface::class)) | $wgCommandLineMode = MW_ENTRY_POINT === 'cli' |
| Pre-config setup: Before loading LocalSettings.php. | |
| $wgConf = new SiteConfiguration | |
| $wgConf hold the site configuration. | |
| global | $wgExtensionFunctions |
| global | $wgFullyInitialised |
| if(MW_ENTRY_POINT==='index') if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli') global | $wgLang = new StubUserLang |
| if(MW_ENTRY_POINT==='index') if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli') global | $wgOut = RequestContext::getMain()->getOutput() |
| global | $wgRequest = RequestContext::getMain()->getRequest() |
| $wgScopeTest = 'MediaWiki Setup.php scope test' | |
| if($wgServer===false) if( $wgCanonicalServer===false) if($wgHTTPUserAgentContact===false) if( $wgServerName !==false) | $wgServerName = parse_url( $wgCanonicalServer, PHP_URL_HOST ) |
| $wgSettings = SettingsBuilder::getInstance() | |
| if(MW_ENTRY_POINT==='index') if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli') global | $wgTitle = null |
| if(defined( 'MW_USE_CONFIG_SCHEMA_CLASS')) | else |
| const | MW_SERVICE_BOOTSTRAP_COMPLETE 1 |
| try | |
The setup for all MediaWiki processes (both web-based and CLI).
The entry point (such as WebStart.php and doMaintenance.php) has these responsibilities:
This file does:
Definition in file Setup.php.
| if(!defined( 'MW_NO_SESSION_HANDLER')) if (defined('MW_SETUP_CALLBACK')) $dynamicDefaults = new DynamicDefaultValues( $wgSettings->getConfigSchema() ) |
Customization point after most things are loaded (constants, functions, classes, LocalSettings.
Note that this runs before extensions are registered, and before most singletons become available, and before MediaWikiServices is initialized.
Definition at line 257 of file Setup.php.
Referenced by MediaWiki\Settings\Config\ConfigSchemaAggregator\addDynamicDefaults().
| if(!defined( 'MEDIAWIKI')) if (!defined('MW_ENTRY_POINT')) $IP = wfDetectInstallPath() |
Environment checks.
These are inline checks done before we include any source files, and thus these conditions may be assumed by all source code.
Source code should use the MW_INSTALL_PATH constant instead (T56483).
Definition at line 102 of file Setup.php.
Referenced by MediaWiki\Shell\CommandFactory\create(), MediaWiki\Installer\Installer\envCheckUploadsDirectory(), MediaWiki\ResourceLoader\Module\expandRelativePaths(), MediaWiki\ResourceLoader\ImageModule\extractLocalBasePath(), MediaWiki\ResourceLoader\OOUIIconPackModule\extractLocalBasePath(), MediaWiki\Installer\Installer\getExistingLocalSettings(), MediaWiki\Installer\SqliteInstaller\getGlobalDefaults(), MediaWiki\Language\Language\getGrammarTransformations(), MediaWiki\Language\LanguageNameUtils\getJsonMessagesFileName(), MediaWiki\Language\LocalisationCache\getMessagesDirs(), MediaWiki\Language\LanguageNameUtils\getMessagesFileName(), MediaWiki\ResourceLoader\Module\getRelativePaths(), MediaWiki\ResourceLoader\StartUpModule\getScript(), MediaWiki\FileRepo\File\File\iconThumb(), MediaWiki\ExternalStore\ExternalStoreDB\initializeTable(), MediaWiki\Settings\LocalSettingsLoader\loadLocalSettingsFile(), MediaWiki\Composer\ComposerPhpunitXmlCoverageEdit\onEvent(), and wfDetectInstallPath().
| $wgAutoloadClasses = [] |
Definition at line 139 of file Setup.php.
Referenced by MediaWiki\Installer\Installer\getExistingLocalSettings().
| if (!interface_exists(LoggerInterface::class)) $wgCommandLineMode = MW_ENTRY_POINT === 'cli' |
Pre-config setup: Before loading LocalSettings.php.
These are changes and additions to runtime that don't vary on site configuration.
Definition at line 130 of file Setup.php.
Referenced by MediaWiki\Installer\Installer\getExistingLocalSettings(), and MediaWiki\Settings\LocalSettingsLoader\loadLocalSettingsFile().
| $wgConf = new SiteConfiguration |
$wgConf hold the site configuration.
Not used for much in a default install.
Definition at line 137 of file Setup.php.
Referenced by MediaWiki\Installer\Installer\getExistingLocalSettings(), and MediaWiki\Settings\LocalSettingsLoader\loadLocalSettingsFile().
| global $wgFullyInitialised |
Definition at line 561 of file Setup.php.
Referenced by MediaWiki\User\User\clearInstanceCache(), MediaWiki\User\User\isSafeToLoad(), MediaWiki\User\User\load(), and MediaWiki\User\User\loadFromCache().
| Language StubUserLang $wgLang = new StubUserLang |
Definition at line 529 of file Setup.php.
Referenced by MediaWiki\Api\ApiMain\__construct(), MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), and UpdateMediaWiki\execute().
| MediaWiki Output OutputPage $wgOut = RequestContext::getMain()->getOutput() |
Definition at line 529 of file Setup.php.
Referenced by MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), MediaWiki\Exception\ThrottledError\report(), MediaWiki\Exception\BadRequestError\report(), MediaWiki\Exception\BadTitleError\report(), MediaWiki\Exception\ErrorPageError\report(), MediaWiki\Exception\PermissionsError\report(), MediaWiki\FileRepo\File\LocalFileLockError\report(), wfHttpError(), and wfVarDump().
| $wgRequest = RequestContext::getMain()->getRequest() |
Definition at line 441 of file Setup.php.
Referenced by MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), and MediaWiki\Api\ApiEditPage\execute().
| $wgSettings = SettingsBuilder::getInstance() |
Definition at line 141 of file Setup.php.
Referenced by MediaWiki\Settings\LocalSettingsLoader\loadLocalSettingsFile().
| Title null $wgTitle = null |
Definition at line 529 of file Setup.php.
Referenced by MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), MediaWiki\Actions\ActionEntryPoint\execute(), MediaWiki\Api\ApiEditPage\execute(), MediaWiki\Api\ApiEntryPoint\execute(), MediaWiki\Api\ApiParse\execute(), MediaWiki\Context\RequestContext\getTitle(), MediaWiki\Linker\Linker\makeExternalLink(), MediaWiki\WikiMap\WikiMap\makeForeignLink(), MediaWiki\Language\MessageCache\parse(), and MediaWiki\Actions\ActionEntryPoint\performRequest().
| if (!defined('MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli') else |
| try |