MediaWiki  master
docs/globals.txt File Reference

Functions

$article view ()
 

Variables

 $oldArticle = $wgArticle
 
versus $oldTitle = $wgTitle
 
 $wgArticle = new Article
 
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration which are documented in DefaultSettings php There is no comprehensive documentation for the remaining however some of the most important ones are listed below They are typically initialised either in index php or in Setup php $wgTitle Title object created from the request URL $wgOut OutputPage object for HTTP response $wgUser User object for the user associated with the current request $wgLang Language object selected by user preferences $wgContLang Language object associated with the wiki being viewed $wgParser Parser object Parser extensions register their hooks here $wgRequest WebRequest to get request data $wgMemc
 
 $wgTitle = Title::newFromText( $t )
 
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an efficient
 
globals will be eliminated from MediaWiki entirely
 
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration which are documented in DefaultSettings php There is no comprehensive documentation for the remaining globals
 
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration which are documented in DefaultSettings php There is no comprehensive documentation for the remaining however some of the most important ones are listed below They are typically initialised either in index php or in Setup php $wgTitle Title object created from the request URL $wgOut OutputPage object for HTTP response $wgUser User object for the user associated with the current request $wgLang Language object selected by user preferences $wgContLang Language object associated with the wiki being viewed $wgParser Parser object Parser extensions register their hooks here $wgRequest WebRequest object
 
globals txt Globals are evil The original MediaWiki code relied on globals for processing context far too often MediaWiki development since then has been a story of slowly moving context out of global variables and into objects Storing processing context in object member variables allows those objects to be reused in a much more flexible way Consider the elegance of
 database rows More...
 
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be seen
 
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration settings
 
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being though
 
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of writing
 

Function Documentation

◆ view()

$wgArticle view ( )

Variable Documentation

◆ $oldArticle

$oldArticle = $wgArticle

Definition at line 17 of file globals.txt.

◆ $oldTitle

◆ $wgArticle

$wgArticle = new Article

Definition at line 21 of file globals.txt.

◆ $wgMemc

globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration which are documented in DefaultSettings php There is no comprehensive documentation for the remaining however some of the most important ones are listed below They are typically initialised either in index php or in Setup php $wgTitle Title object created from the request URL $wgOut OutputPage object for HTTP response $wgUser User object for the user associated with the current request $wgLang Language object selected by user preferences $wgContLang Language object associated with the wiki being viewed $wgParser Parser object Parser extensions register their hooks here $wgRequest WebRequest to get request data $wgMemc

◆ $wgTitle

$wgTitle = Title::newFromText( $t )

Definition at line 20 of file globals.txt.

◆ efficient

globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an efficient

Definition at line 25 of file globals.txt.

◆ entirely

globals will be eliminated from MediaWiki entirely

Definition at line 25 of file globals.txt.

Referenced by CleanupInvalidDbKeys::__construct().

◆ globals

globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration which are documented in DefaultSettings php There is no comprehensive documentation for the remaining globals

◆ object

globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration which are documented in DefaultSettings php There is no comprehensive documentation for the remaining however some of the most important ones are listed below They are typically initialised either in index php or in Setup php $wgTitle Title object created from the request URL $wgOut OutputPage object for HTTP response $wgUser User object for the user associated with the current request $wgLang Language object selected by user preferences $wgContLang Language object associated with the wiki being viewed $wgParser Parser object Parser extensions register their hooks here $wgRequest WebRequest object

Definition at line 25 of file globals.txt.

Referenced by ApiResult::applyTransformations(), Wikimedia\Rdbms\FakeResultWrapper::current(), PathRouter::doAdd(), BlockListPagerTest::formatValueDefaultProvider(), BatchRowUpdateTest::genSelectResult(), MediaWiki\Tests\Maintenance\CategoriesRdfTest::getCategoryIterator(), MediaWiki\Tests\Maintenance\CategoriesRdfTest::getCategoryLinksIterator(), CategoryChangesAsRdfTest::getCategoryLinksIterator(), CommentStore::getCommentInternal(), ResourceLoaderStartUpModule::getConfigSettings(), ImagePage::imageLinks(), ResourceLoader::makeModuleResponse(), DatabaseLogEntry::newFromRow(), BotPassword::newUnsaved(), DatabaseTestHelper::open(), PopulateContentTables::populateTable(), CategoryChangesAsRdfTest::provideCategoryData(), MediaWiki\Tests\Revision\RevisionStoreRecordTest::provideConstructor(), MediaWiki\Tests\Revision\RevisionArchiveRecordTest::provideConstructor(), MediaWiki\Tests\Revision\RevisionArchiveRecordTest::provideConstructorFailure(), MediaWiki\Tests\Revision\RevisionStoreRecordTest::provideConstructorFailure(), MediaWiki\Tests\Rest\ResponseFactoryTest::provideCreateFromReturnValue(), JsonContentTest::provideDataAndParserText(), MediaWiki\Tests\Rest\ResponseFactoryTest::provideEncodeJson(), ApiFormatNoneTest::provideGeneralEncoding(), ApiFormatXmlTest::provideGeneralEncoding(), OutputPageTest::provideGetCategories(), RevisionTest::provideGetRevisionText(), RevisionTest::provideGetRevisionTextWithGzipAndLegacyEncoding(), RevisionTest::provideGetRevisionTextWithLegacyEncoding(), RevisionTest::provideGetRevisionTextWithZlibExtension(), RevisionTest::provideGetRevisionTextWithZlibExtension_badData(), ResourceLoaderFileModuleTest::provideGetScriptPackageFiles(), RevisionMcrWriteBothDbTest::provideGetTextId(), RevisionNoContentModelDbTest::provideGetTextId(), RevisionPreMcrDbTest::provideGetTextId(), MediaWiki\Tests\Revision\SlotRecordTest::provideInvalidConstruction(), ResourcesTest::provideMediaStylesheets(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase::provideNonHistoryRevision(), MediaWiki\Session\SessionTest::provideSecretsRoundTripping(), WANObjectCacheTest::provideSetAndGet(), RevisionTest::provideTestGetRevisionText_returnsDecompressedTextFieldWhenNotExternal(), ApiResultTest::provideTransformations(), JsonContentTest::provideValidConstruction(), MediaWiki\Tests\Maintenance\DeleteAutoPatrolLogsTest::runProvider(), JobQueueRedis::serialize(), MediaWiki\Auth\AbstractPasswordPrimaryAuthenticationProvider::setPasswordResetFlag(), MediaWiki\Storage\PageEditStash::storeStashValue(), ApiResult::stripMetadata(), ApiResult::stripMetadataNonRecursive(), FormOptionsInitializationTest::testAddIntegers(), ApiResultTest::testAddMetadataToResultVars(), FormOptionsInitializationTest::testAddStringOption(), RevisionTest::testConstructFromRow(), ChangeTagsTest::testDeleteTags(), BlockListPagerTest::testFormatValueRestrictions(), MediaWiki\Tests\Revision\McrWriteBothRevisionStoreDbTest::testInsertRevisionFromArchiveRow_unmigratedArchiveRow(), ChangeTagsTest::testListExplicitlyDefinedTags(), RevisionTest::testLoadFromTitle(), DatabaseLogEntryTest::testNewFromId(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase::testNewRevisionFromArchiveRow_no_user(), MediaWiki\Tests\Revision\RevisionStoreDbTestBase::testNewRevisionFromRow_no_user(), BlockListPagerTest::testPreprocessResults(), MultiWriteBagOStuffTest::testSetDelayed(), BagOStuffTest::testSetDeleteMulti(), ChangeTagsTest::testUpdateTags(), ChangeTagsTest::testUpdateTagsDoNothingOnRepeatedCall(), ChangeTagsTest::testUpdateTagsSkipDuplicates(), ApiResultTest::testUtilityFunctions(), FormatJsonTest::toObject(), and MediaWiki\Auth\ResetPasswordSecondaryAuthenticationProvider::tryReset().

◆ of

◆ seen

globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be seen

Definition at line 25 of file globals.txt.

◆ settings

globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration settings

◆ though

globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being though

Definition at line 25 of file globals.txt.

◆ writing

globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of writing

Definition at line 25 of file globals.txt.