Handbuch:Global object variables
From MediaWiki.org
This page is a translated version of the page Manual:Global object variables and the translation is 29% complete.
Beim Start von MediaWiki werden Hunderte von "globals" (d.h. Objekt-Variablen) initialisiert. Die Mehrheit dieser globalen Variablen sind Konfigurationseinstellungen, die in DefaultSettings.php und LocalSettings.php gesetzt sind. (See Manual:Configuration settings for documentation on these variables.) Es gibt keine umfassende Dokumentation für die restlichen globalen Variablen, aber einige der wichtigsten sind im Folgenden aufgeführt. Sie sind in der Regel entweder in der index.php oder in Setup.php initialisiert.
Globale Variablen[edit | edit source]
- $mediaWiki - MediaWiki object, the main base class for the MediaWiki software. Initializes the
$wgTitle
and$wgArticle
objects, and executes the URL actions. - $wgArticle - Article object corresponding to
$wgTitle
. - $wgContLang - Language object associated with the wiki being viewed.
- $wgLang - Language object selected by user preferences
- $wgLoadBalancer - LoadBalancer object, manages database connections.
Hinweis: This variable doesn't exist anymore in 1.13
- $wgMessageCache - Message cache to manage interface messages
- $wgOut - OutputPage object for HTTP response.
- $wgParser - Parser object. Parser extensions register their hooks here.
- $wgRequest - WebRequest object, to get request data
- $wgTitle - Title object created from the request URL.
Hinweis: This variable should be avoided when possible, more sane title objects are usually available.
- $wgUser - User object for the user associated with the current request.