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_SETUP_CALLBACK')) | $dynamicDefaults = new DynamicDefaultValues( $wgSettings->getConfigSchema() ) |
Customization point after most things are loaded (constants, functions, classes, LocalSettings. | |
if(!defined( 'MEDIAWIKI')) if(ini_get('mbstring.func_overload')) if(!defined( 'MW_ENTRY_POINT')) global | $IP = wfDetectInstallPath() |
Environment checks. | |
if(!defined('MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli') if(MW_ENTRY_POINT !=='cli' && $wgPingback | $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 = true |
if( $wgServer===false) global | $wgHooks |
global | $wgInitialSessionId = null |
if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli' | $wgLang = new StubUserLang |
if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli' | $wgOut = RequestContext::getMain()->getOutput() |
global | $wgRequest = RequestContext::getMain()->getRequest() |
$wgScopeTest = 'MediaWiki Setup.php scope test' | |
if( $wgServerName !==false) | $wgServerName = parse_url( $wgCanonicalServer, PHP_URL_HOST ) |
$wgSettings = SettingsBuilder::getInstance() | |
if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli' | $wgTitle = null |
$wgUser = new StubGlobalUser( RequestContext::getMain()->getUser() ) | |
if( $wgCanonicalServer===false) | $wgVirtualRestConfig ['global']['domain'] = $wgCanonicalServer |
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:
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')) $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().
$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 117 of file Setup.php.
Referenced by CommandLineInstaller\__construct(), MediaWiki\Shell\CommandFactory\create(), MediaWiki\Maintenance\MaintenanceRunner\defineSettings(), MediaWiki\Installer\Installer\envCheckUploadsDirectory(), MediaWiki\Installer\Installer\envPrepPath(), BenchmarkSettings\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(), MediaWiki\Maintenance\Version\execute(), MediaWiki\ResourceLoader\Module\expandRelativePaths(), MediaWiki\ResourceLoader\ImageModule\extractLocalBasePath(), MediaWiki\ResourceLoader\OOUIIconPackModule\extractLocalBasePath(), MediaWiki\Installer\Installer\getExistingLocalSettings(), FindDeprecated\getFiles(), MediaWiki\Installer\SqliteInstaller\getGlobalDefaults(), MediaWiki\Language\Language\getGrammarTransformations(), MediaWiki\Languages\LanguageNameUtils\getJsonMessagesFileName(), LocalisationCache\getMessagesDirs(), MediaWiki\Languages\LanguageNameUtils\getMessagesFileName(), MediaWiki\ResourceLoader\Module\getRelativePaths(), MediaWiki\ResourceLoader\StartUpModule\getScript(), File\iconThumb(), MediaWiki\Installer\Installer\includeExtensionFiles(), ExternalStoreDB\initializeTable(), MediaWiki\Settings\LocalSettingsLoader\loadLocalSettingsFile(), MediaWiki\Composer\ComposerPhpunitXmlCoverageEdit\onEvent(), TextPassDumper\openSpawn(), MediaWiki\Installer\DatabaseInstaller\populateInterwikiTable(), MediaWiki\Installer\SqliteInstaller\setupSearchIndex(), and wfDetectInstallPath().
if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli') if (MW_ENTRY_POINT !=='cli' &&$wgPingback $settingsWarnings) = $wgSettings->getWarnings() |
$wgAutoloadClasses = [] |
Definition at line 153 of file Setup.php.
Referenced by MediaWiki\Installer\Installer\getExistingLocalSettings(), and MediaWiki\Installer\Installer\includeExtensionFiles().
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 144 of file Setup.php.
Referenced by MediaWiki\Settings\LocalSettingsLoader\loadLocalSettingsFile().
$wgConf = new SiteConfiguration |
global $wgFullyInitialised = true |
Definition at line 568 of file Setup.php.
Referenced by MediaWiki\User\User\clearInstanceCache(), MediaWiki\User\User\isSafeToLoad(), MediaWiki\User\User\load(), and MediaWiki\User\User\loadFromCache().
$wgHooks |
$wgInitialSessionId = null |
Definition at line 419 of file Setup.php.
Referenced by MediaWiki\SpecialPage\LoginSignupSpecialPage\hasSessionCookie().
Language StubUserLang $wgLang = new StubUserLang |
Definition at line 540 of file Setup.php.
Referenced by MediaWiki\Api\ApiMain\__construct(), MediaWiki\Installer\CliInstaller\__construct(), ParserOptions\__construct(), LogPage\actionText(), MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), MediaWiki\Installer\Installer\envCheckDB(), LocalFileRestoreBatch\execute(), MediaWiki\Installer\WebInstallerLanguage\execute(), UpdateMediaWiki\execute(), MediaWiki\User\User\getDatePreference(), File\getDescriptionText(), ForeignDBFile\getDescriptionText(), MediaHandler\getGeneralShortDesc(), GIFHandler\getLongDesc(), PNGHandler\getLongDesc(), ImageHandler\getShortDesc(), MediaWiki\Xml\Xml\monthSelector(), MediaWiki\Html\Html\namespaceSelectorOptions(), MediaWiki\Installer\Installer\resetMediaWikiServices(), MediaWiki\User\User\sendConfirmationMail(), MediaWiki\Installer\WebInstaller\setupLanguage(), ForeignAPIFile\transform(), and wfInstallerMain().
MediaWiki Output OutputPage $wgOut = RequestContext::getMain()->getOutput() |
Definition at line 540 of file Setup.php.
Referenced by MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), MediaWiki\Feed\FeedUtils\checkFeedOutput(), UploadBase\detectVirus(), MediaWiki\Feed\ChannelFeed\httpHeaders(), ThrottledError\report(), BadRequestError\report(), BadTitleError\report(), ErrorPageError\report(), PermissionsError\report(), LocalFileLockError\report(), wfHttpError(), and wfVarDump().
$wgRequest = RequestContext::getMain()->getRequest() |
Definition at line 419 of file Setup.php.
Referenced by MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), MediaWiki\Api\ApiEditPage\execute(), MediaWiki\Context\RequestContext\importScopedSession(), RecentChange\newLogEntry(), and MediaWiki\Output\OutputPage\transformCssMedia().
if ($wgServerName !==false) $wgServerName = parse_url( $wgCanonicalServer, PHP_URL_HOST ) |
$wgSettings = SettingsBuilder::getInstance() |
Definition at line 155 of file Setup.php.
Referenced by MediaWiki\Settings\LocalSettingsLoader\loadLocalSettingsFile().
Title null $wgTitle = null |
Definition at line 540 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(), MessageCache\parse(), and MediaWiki\Actions\ActionEntryPoint\performRequest().
User $wgUser = new StubGlobalUser( RequestContext::getMain()->getUser() ) |
Definition at line 547 of file Setup.php.
Referenced by MediaWiki\SpecialPage\SpecialPageFactory\capturePath(), DoubleRedirectJob\run(), and MediaWiki\StubObject\StubGlobalUser\setUser().
if ($wgCanonicalServer===false) $wgVirtualRestConfig[ 'global'][ 'domain'] = $wgCanonicalServer |
if (!defined('MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli') else |
try |