MediaWiki REL1_39
|
The setup for all MediaWiki processes (both web-based and CLI). More...
Go to the source code of this file.
Variables | |
if(defined('MW_SETUP_CALLBACK')) if( $wgSettings->getConfig() ->get(MainConfigNames::WikiFarmSettingsDirectory)) | $dynamicDefaults = new DynamicDefaultValues( $wgSettings->getConfigSchema() ) |
Customization point after all loading (constants, functions, classes, LocalSettings). | |
if(!defined( 'MEDIAWIKI')) if(ini_get('mbstring.func_overload')) if(!defined( 'MW_ENTRY_POINT')) global | $IP = $IP = wfDetectInstallPath() |
Environment checks. | |
$serverParts = wfParseUrl( $wgCanonicalServer ) | |
if(!defined('MW_NO_SESSION') &&! $wgCommandLineMode) if(! $wgCommandLineMode) | $settingsWarnings = $wgSettings->getWarnings() |
$wgAutoloadClasses = $wgAutoloadClasses ?? [] | |
if(!interface_exists(LoggerInterface::class)) | $wgCommandLineMode = $wgCommandLineMode ?? false |
Pre-config setup: Before loading LocalSettings.php. | |
$wgConf = new SiteConfiguration | |
$wgConf hold the site configuration. | |
global | $wgExtensionFunctions |
global | $wgFullyInitialised = true |
global | $wgInitialSessionId = null |
The persistent session ID (if any) loaded at startup. | |
if(!defined( 'MW_NO_SESSION') &&! $wgCommandLineMode | $wgLang = new StubUserLang |
if(!defined( 'MW_NO_SESSION') &&! $wgCommandLineMode | $wgOut = RequestContext::getMain()->getOutput() |
global | $wgRequest = RequestContext::getMain()->getRequest() |
$wgScopeTest = 'MediaWiki Setup.php scope test' | |
if( $wgServerName !==false) | $wgServerName = $serverParts['host'] |
$wgSettings | |
if(!defined( 'MW_NO_SESSION') &&! $wgCommandLineMode | $wgTitle = null |
$wgUser = new StubGlobalUser( RequestContext::getMain()->getUser() ) | |
if($wgServer===false) if( $wgCanonicalServer===false) | $wgVirtualRestConfig ['global']['domain'] = $wgCanonicalServer |
if(defined('MW_USE_CONFIG_SCHEMA_CLASS')) elseif(getenv( 'MW_USE_LEGACY_DEFAULT_SETTINGS')||defined( 'MW_USE_LEGACY_DEFAULT_SETTINGS')) | else |
const | MW_SERVICE_BOOTSTRAP_COMPLETE 1 |
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:
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html
Definition in file Setup.php.
if(defined( 'MW_SETUP_CALLBACK')) if ($wgSettings->getConfig() ->get(MainConfigNames::WikiFarmSettingsDirectory)) $dynamicDefaults = new DynamicDefaultValues( $wgSettings->getConfigSchema() ) |
Customization point after all loading (constants, functions, classes, LocalSettings).
Specifically, this is before usage of settings, before instantiation of Profiler (and other singletons), and before any setup functions or hooks run.
Definition at line 249 of file Setup.php.
Referenced by MediaWiki\Settings\Config\ConfigSchemaAggregator\addDynamicDefaults().
$IP = $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.
Definition at line 106 of file Setup.php.
Referenced by CommandLineInstaller\__construct(), MediaWiki\Shell\CommandFactory\create(), MediaWiki\Maintenance\MaintenanceRunner\defineSettings(), Installer\envCheckUploadsDirectory(), Installer\envPrepPath(), SpecialVersion\execute(), BenchmarkSettings\execute(), CheckComposerLockUpToDate\execute(), CleanupSpam\execute(), DumpUploads\execute(), FindDeprecated\execute(), GenerateJsonI18n\execute(), SchemaMaintenance\execute(), CommandLineInstaller\execute(), DateFormats\execute(), GenerateNormalizerDataAr\execute(), GenerateNormalizerDataMl\execute(), ManageForeignResources\execute(), GeneratePhpCharToUpperMappings\execute(), MwSql\execute(), Version\execute(), MediaWiki\ResourceLoader\Module\expandRelativePaths(), MediaWiki\ResourceLoader\FileModule\extractBasePaths(), MediaWiki\ResourceLoader\ImageModule\extractLocalBasePath(), MediaWiki\ResourceLoader\OOUIIconPackModule\extractLocalBasePath(), SpecialVersion\getCreditsForExtension(), Installer\getExistingLocalSettings(), SpecialVersion\getExternalLibraries(), FindDeprecated\getFiles(), SqliteInstaller\getGlobalDefaults(), Language\getGrammarTransformations(), MediaWiki\ResourceLoader\CodexModule\getIcons(), MediaWiki\Languages\LanguageNameUtils\getJsonMessagesFileName(), LocalisationCache\getMessagesDirs(), MediaWiki\Languages\LanguageNameUtils\getMessagesFileName(), MediaWiki\ResourceLoader\Module\getRelativePaths(), SpecialVersion\getVersion(), File\iconThumb(), Installer\includeExtensionFiles(), MediaWiki\Maintenance\MaintenanceRunner\init(), ExternalStoreDB\initializeTable(), MediaWiki\Settings\LocalSettingsLoader\loadLocalSettingsFile(), ComposerPhpunitXmlCoverageEdit\onEvent(), TextPassDumper\openSpawn(), DatabaseInstaller\populateInterwikiTable(), SqliteInstaller\setupSearchIndex(), and wfDetectInstallPath().
$serverParts = wfParseUrl( $wgCanonicalServer ) |
if(!defined( 'MW_NO_SESSION') &&! $wgCommandLineMode) if (! $wgCommandLineMode) $settingsWarnings = $wgSettings->getWarnings() |
$wgAutoloadClasses = $wgAutoloadClasses ?? [] |
Definition at line 141 of file Setup.php.
Referenced by Installer\getExistingLocalSettings(), and Installer\includeExtensionFiles().
if (!interface_exists(LoggerInterface::class)) $wgCommandLineMode = $wgCommandLineMode ?? false |
$wgConf = new SiteConfiguration |
global $wgFullyInitialised = true |
Definition at line 525 of file Setup.php.
Referenced by User\clearInstanceCache(), User\isSafeToLoad(), User\load(), and User\loadFromCache().
if (MW_ENTRY_POINT==='index') MediaWiki Session SessionId null $wgInitialSessionId = null |
Language StubUserLang $wgLang = new StubUserLang |
Definition at line 497 of file Setup.php.
Referenced by ApiMain\__construct(), PermissionsError\__construct(), CliInstaller\__construct(), ParserOptions\__construct(), LogPage\actionText(), SpecialEditWatchlist\buildTools(), MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), Installer\envCheckDB(), LocalFileRestoreBatch\execute(), WebInstallerLanguage\execute(), UpdateMediaWiki\execute(), SpecialVersion\getCopyrightAndAuthorList(), User\getDatePreference(), File\getDescriptionText(), ForeignDBFile\getDescriptionText(), MediaHandler\getGeneralShortDesc(), GIFHandler\getLongDesc(), PNGHandler\getLongDesc(), Title\getPageLanguage(), ContentHandler\getPageLanguage(), Title\getPageViewLanguage(), ImageHandler\getShortDesc(), Xml\monthSelector(), Html\namespaceSelectorOptions(), User\newFatalPermissionDeniedStatus(), Installer\resetMediaWikiServices(), User\sendConfirmationMail(), LoginSignupSpecialPage\setSessionUserForCurrentRequest(), WebInstaller\setupLanguage(), ForeignAPIFile\transform(), Linker\userToolLinks(), wfGetLangObj(), and wfInstallerMain().
OutputPage $wgOut = RequestContext::getMain()->getOutput() |
Definition at line 497 of file Setup.php.
Referenced by MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), FeedUtils\checkFeedOutput(), UploadBase\detectVirus(), ChannelFeed\httpHeaders(), ThrottledError\report(), BadRequestError\report(), BadTitleError\report(), ErrorPageError\report(), PermissionsError\report(), LocalFileLockError\report(), MWException\reportHTML(), wfHttpError(), and wfVarDump().
$wgRequest = RequestContext::getMain()->getRequest() |
Definition at line 377 of file Setup.php.
Referenced by MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), ApiEditPage\execute(), LanguageConverter\findVariantLink(), WebInstaller\getAcceptLanguage(), LanguageConverter\getHeaderVariant(), MWExceptionHandler\getURL(), LanguageConverter\getURLVariant(), RequestContext\importScopedSession(), MediaWiki\Rest\EntryPoint\main(), RecentChange\newLogEntry(), OutputPage\transformCssMedia(), wfApiMain(), wfLoadMain(), wfOpenSearchDescMain(), and wfThumbMain().
if ($wgServerName !==false) $wgServerName = $serverParts['host'] |
$wgSettings |
Definition at line 143 of file Setup.php.
Referenced by MediaWiki\Settings\LocalSettingsLoader\loadLocalSettingsFile().
Title null $wgTitle = null |
Definition at line 497 of file Setup.php.
Referenced by MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), Parser\cleanSig(), ApiEditPage\execute(), ApiParse\execute(), RequestContext\getTitle(), MediaWiki\Rest\EntryPoint\main(), Linker\makeExternalLink(), MessageCache\parse(), Parser\transformMsg(), and wfApiMain().
User $wgUser = new StubGlobalUser( RequestContext::getMain()->getUser() ) |
Definition at line 504 of file Setup.php.
Referenced by MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), DoubleRedirectJob\run(), and StubGlobalUser\setUser().
if (!defined('MW_NO_SESSION') &&! $wgCommandLineMode) else |