42 parent::__construct(
'Version' );
55 $out->allowClickjacking();
58 $parts = explode(
'/', (
string)$par );
60 if ( isset( $parts[1] ) ) {
61 $extName = str_replace(
'_',
' ', $parts[1] );
65 if ( isset( $ext[
'name'] ) && ( $ext[
'name'] === $extName ) ) {
72 $out->setStatusCode( 404 );
75 $extName =
'MediaWiki';
79 switch ( strtolower( $parts[0] ) ) {
81 $wikiText =
'{{int:version-credits-not-found}}';
82 if ( $extName ===
'MediaWiki' ) {
83 $wikiText = file_get_contents( $IP .
'/CREDITS' );
84 } elseif ( ( $extNode !== null ) && isset( $extNode[
'path'] ) ) {
87 $wikiText = file_get_contents( $file );
88 if ( substr( $file, -4 ) ===
'.txt' ) {
101 $out->setPageTitle( $this->
msg(
'version-credits-title', $extName ) );
102 $out->addWikiText( $wikiText );
106 $wikiText =
'{{int:version-license-not-found}}';
107 if ( $extName ===
'MediaWiki' ) {
108 $wikiText = file_get_contents( $IP .
'/COPYING' );
109 } elseif ( ( $extNode !== null ) && isset( $extNode[
'path'] ) ) {
112 $wikiText = file_get_contents( $file );
124 $out->setPageTitle( $this->
msg(
'version-license-title', $extName ) );
125 $out->addWikiText( $wikiText );
129 $out->addModuleStyles(
'mediawiki.special.version' );
157 [
'id' =>
'mw-version-license' ],
162 $ret .=
'<div class="plainlinks">';
164 " . self::getCopyrightAndAuthorList() .
"\n
165 " .
wfMessage(
'version-license-info' )->text();
168 return str_replace(
"\t\t",
'',
$ret ) .
"\n";
179 if ( defined(
'MEDIAWIKI_INSTALL' ) ) {
180 $othersLink =
'[https://www.mediawiki.org/wiki/Special:Version/Credits ' .
181 wfMessage(
'version-poweredby-others' )->text() .
']';
183 $othersLink =
'[[Special:Version/Credits|' .
184 wfMessage(
'version-poweredby-others' )->text() .
']]';
187 $translatorsLink =
'[https://translatewiki.net/wiki/Translating:MediaWiki/Credits ' .
188 wfMessage(
'version-poweredby-translators' )->text() .
']';
191 'Magnus Manske',
'Brion Vibber',
'Lee Daniel Crocker',
192 'Tim Starling',
'Erik Möller',
'Gabriel Wicke',
'Ævar Arnfjörð Bjarmason',
193 'Niklas Laxström',
'Domas Mituzas',
'Rob Church',
'Yuri Astrakhan',
194 'Aryeh Gregor',
'Aaron Schulz',
'Andrew Garrett',
'Raimond Spekking',
195 'Alexandre Emsenhuber',
'Siebrand Mazeland',
'Chad Horohoe',
196 'Roan Kattouw',
'Trevor Parscal',
'Bryan Tong Minh',
'Sam Reed',
197 'Victor Vasiliev',
'Rotem Liss',
'Platonides',
'Antoine Musso',
198 'Timo Tijhof',
'Daniel Kinzler',
'Jeroen De Dauw',
'Brad Jorsch',
199 $othersLink, $translatorsLink
203 $wgLang->listToText( $authorList ) )->
text();
218 $software[
'[https://www.mediawiki.org/ MediaWiki]'] = self::getVersionLinked();
220 $software[
'[http://hhvm.com/ HHVM]'] = HHVM_VERSION .
" (" . PHP_SAPI .
")";
222 $software[
'[https://php.net/ PHP]'] = PHP_VERSION .
" (" . PHP_SAPI .
")";
224 $software[
$dbr->getSoftwareLink()] =
$dbr->getServerInfo();
235 [
'id' =>
'mw-version-software' ],
238 Xml::openElement(
'table', [
'class' =>
'wikitable plainlinks',
'id' =>
'sv-software' ] ) .
240 <th>" .
wfMessage(
'version-software-product' )->text() .
"</th>
241 <th>" .
wfMessage(
'version-software-version' )->text() .
"</th>
244 foreach ( $software
as $name => $version ) {
246 <td>" .
$name .
"</td>
247 <td dir=\"ltr\">" . $version .
"</td>
264 $gitInfo = self::getGitHeadSha1( $IP );
267 } elseif (
$flags ===
'nodb' ) {
268 $shortSha1 = substr( $gitInfo, 0, 7 );
269 $version =
"$wgVersion ($shortSha1)";
271 $shortSha1 = substr( $gitInfo, 0, 7 );
273 if (
$lang !== null ) {
274 $msg->inLanguage(
$lang );
276 $shortSha1 = $msg->params( $shortSha1 )->escaped();
277 $version =
"$wgVersion $shortSha1";
293 $gitVersion = self::getVersionLinkedGit();
309 if (
Hooks::run(
'SpecialVersionVersionUrl', [ $wgVersion, &$versionUrl ] ) ) {
311 preg_match(
"/^(\d+\.\d+)/", $wgVersion, $versionParts );
312 $versionUrl =
"https://www.mediawiki.org/wiki/MediaWiki_{$versionParts[1]}";
315 return "[$versionUrl $wgVersion]";
327 $headSHA1 = $gitInfo->getHeadSHA1();
332 $shortSHA1 =
'(' . substr( $headSHA1, 0, 7 ) .
')';
334 $gitHeadUrl = $gitInfo->getHeadViewUrl();
335 if ( $gitHeadUrl !==
false ) {
336 $shortSHA1 =
"[$gitHeadUrl $shortSHA1]";
339 $gitHeadCommitDate = $gitInfo->getHeadCommitDate();
340 if ( $gitHeadCommitDate ) {
341 $shortSHA1 .=
Html::element(
'br' ) . $wgLang->timeanddate( $gitHeadCommitDate,
true );
344 return self::getwgVersionLinked() .
" $shortSHA1";
358 if ( self::$extensionTypes ===
false ) {
359 self::$extensionTypes = [
360 'specialpage' =>
wfMessage(
'version-specialpages' )->text(),
361 'parserhook' =>
wfMessage(
'version-parserhooks' )->text(),
362 'variable' =>
wfMessage(
'version-variables' )->text(),
363 'media' =>
wfMessage(
'version-mediahandlers' )->text(),
364 'antispam' =>
wfMessage(
'version-antispam' )->text(),
365 'skin' =>
wfMessage(
'version-skins' )->text(),
366 'api' =>
wfMessage(
'version-api' )->text(),
367 'other' =>
wfMessage(
'version-other' )->text(),
370 Hooks::run(
'ExtensionTypes', [ &self::$extensionTypes ] );
373 return self::$extensionTypes;
386 $types = self::getExtensionTypes();
388 return isset( $types[
$type] ) ? $types[
$type] : $types[
'other'];
397 global $wgExtensionCredits;
400 count( $wgExtensionCredits ) === 0 ||
402 ( count( $wgExtensionCredits ) === 1 && isset( $wgExtensionCredits[
'skin'] ) )
411 [
'id' =>
'mw-version-ext' ],
412 $this->
msg(
'version-extensions' )->
text()
414 Xml::openElement(
'table', [
'class' =>
'wikitable plainlinks',
'id' =>
'sv-ext' ] );
417 if ( !array_key_exists(
'other', $wgExtensionCredits ) ) {
418 $wgExtensionCredits[
'other'] = [];
424 $wgExtensionCredits[
'other'] = array_merge( $wgExtensionCredits[
'other'],
$extensions );
428 $this->firstExtOpened =
false;
432 if (
$type !==
'other' &&
$type !==
'skin' ) {
451 global $wgExtensionCredits;
452 if ( !isset( $wgExtensionCredits[
'skin'] ) || count( $wgExtensionCredits[
'skin'] ) === 0 ) {
458 [
'id' =>
'mw-version-skin' ],
459 $this->
msg(
'version-skins' )->
text()
461 Xml::openElement(
'table', [
'class' =>
'wikitable plainlinks',
'id' =>
'sv-skin' ] );
463 $this->firstExtOpened =
false;
478 $path =
"$IP/vendor/composer/installed.json";
479 if ( !file_exists(
$path ) ) {
486 [
'id' =>
'mw-version-libraries' ],
487 $this->
msg(
'version-libraries' )->
text()
491 [
'class' =>
'wikitable plainlinks',
'id' =>
'sv-libraries' ]
501 foreach ( $installed->getInstalledDependencies()
as $name => $info ) {
502 if ( strpos( $info[
'type'],
'mediawiki-' ) === 0 ) {
507 $authors = array_map(
function( $arr ) {
509 if ( isset( $arr[
'homepage'] ) ) {
510 return "[{$arr['homepage']} {$arr['name']}]";
513 }, $info[
'authors'] );
514 $authors = $this->
listAuthors( $authors,
false,
"$IP/vendor/$name" );
524 "https://packagist.org/packages/$name", $name,
526 [
'class' =>
'mw-version-library-name' ]
529 .
Html::element(
'td', [
'dir' =>
'auto' ], $info[
'version'] )
531 .
Html::element(
'td', [
'lang' =>
'en',
'dir' =>
'ltr' ], $info[
'description'] )
548 $tags = $wgParser->getTags();
550 if ( count( $tags ) ) {
554 'class' =>
'mw-headline plainlinks',
555 'id' =>
'mw-version-parser-extensiontags',
558 'https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Tag_extensions',
559 $this->
msg(
'version-parser-extensiontags' )->parse(),
564 array_walk( $tags,
function ( &
$value ) {
570 'style' =>
'white-space: nowrap;',
592 $fhooks = $wgParser->getFunctionHooks();
593 if ( count( $fhooks ) ) {
597 'class' =>
'mw-headline plainlinks',
598 'id' =>
'mw-version-parser-function-hooks',
601 'https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Parser_functions',
602 $this->
msg(
'version-parser-function-hooks' )->parse(),
626 global $wgExtensionCredits;
630 if ( array_key_exists(
$type, $wgExtensionCredits ) && count( $wgExtensionCredits[
$type] ) > 0 ) {
633 usort( $wgExtensionCredits[$type], [ $this,
'compare' ] );
635 foreach ( $wgExtensionCredits[$type]
as $extension ) {
650 if ( $a[
'name'] === $b[
'name'] ) {
682 if ( isset( $extension[
'namemsg'] ) ) {
684 $extensionName = $this->
msg( $extension[
'namemsg'] )->text();
685 } elseif ( isset( $extension[
'name'] ) ) {
687 $extensionName = $extension[
'name'];
689 $extensionName = $this->
msg(
'version-no-ext-name' )->text();
692 if ( isset( $extension[
'url'] ) ) {
698 [
'class' =>
'mw-version-ext-name' ]
701 $extensionNameLink = $extensionName;
707 $canonicalVersion =
'–';
708 $extensionPath = null;
713 if ( isset( $extension[
'version'] ) ) {
714 $canonicalVersion =
$out->parseInline( $extension[
'version'] );
717 if ( isset( $extension[
'path'] ) ) {
719 $extensionPath = dirname( $extension[
'path'] );
720 if ( $this->coreId ==
'' ) {
721 wfDebug(
'Looking up core head id' );
722 $coreHeadSHA1 = self::getGitHeadSha1( $IP );
723 if ( $coreHeadSHA1 ) {
724 $this->coreId = $coreHeadSHA1;
728 $memcKey =
wfMemcKey(
'specialversion-ext-version-text', $extension[
'path'], $this->coreId );
729 list( $vcsVersion, $vcsLink, $vcsDate ) =
$cache->get( $memcKey );
731 if ( !$vcsVersion ) {
732 wfDebug(
"Getting VCS info for extension {$extension['name']}" );
733 $gitInfo =
new GitInfo( $extensionPath );
734 $vcsVersion = $gitInfo->getHeadSHA1();
735 if ( $vcsVersion !==
false ) {
736 $vcsVersion = substr( $vcsVersion, 0, 7 );
737 $vcsLink = $gitInfo->getHeadViewUrl();
738 $vcsDate = $gitInfo->getHeadCommitDate();
740 $cache->set( $memcKey, [ $vcsVersion, $vcsLink, $vcsDate ], 60 * 60 * 24 );
742 wfDebug(
"Pulled VCS info for extension {$extension['name']} from cache" );
748 [
'class' =>
'mw-version-ext-version' ],
756 $this->
msg(
'version-version', $vcsVersion ),
759 [
'class' =>
'mw-version-ext-vcs-version' ]
763 [
'class' =>
'mw-version-ext-vcs-version' ],
767 $versionString .=
" {$vcsVerString}";
771 [
'class' =>
'mw-version-ext-vcs-timestamp' ],
772 $this->
getLanguage()->timeanddate( $vcsDate,
true )
774 $versionString .=
" {$vcsTimeString}";
777 [
'class' =>
'mw-version-ext-meta-version' ],
785 if ( isset( $extension[
'name'] ) ) {
787 if ( isset( $extension[
'license-name'] ) ) {
788 $licenseName =
$out->parseInline( $extension[
'license-name'] );
790 $licenseName = $this->
msg(
'version-ext-license' )->escaped();
792 if ( $licenseName !== null ) {
797 'class' =>
'mw-version-ext-license',
807 if ( isset( $extension[
'descriptionmsg'] ) ) {
809 $descriptionMsg = $extension[
'descriptionmsg'];
811 if ( is_array( $descriptionMsg ) ) {
812 $descriptionMsgKey = $descriptionMsg[0];
813 array_shift( $descriptionMsg );
814 array_map(
"htmlspecialchars", $descriptionMsg );
815 $description = $this->
msg( $descriptionMsgKey, $descriptionMsg )->text();
817 $description = $this->
msg( $descriptionMsg )->text();
819 } elseif ( isset( $extension[
'description'] ) ) {
821 $description = $extension[
'description'];
825 $description =
$out->parseInline( $description );
828 $authors = isset( $extension[
'author'] ) ? $extension[
'author'] : [];
829 $authors = $this->
listAuthors( $authors, $extension[
'name'], $extensionPath );
833 'class' =>
'mw-version-ext',
857 if ( $wgSpecialVersionShowHooks && count( $wgHooks ) ) {
862 $ret[] =
'== {{int:version-hooks}} ==';
869 foreach ( $myWgHooks
as $hook => $hooks ) {
878 return implode(
"\n",
$ret );
887 $opt = [
'colspan' => 5 ];
888 if ( $this->firstExtOpened ) {
894 $this->firstExtOpened =
true;
897 $opt[
'id'] =
"sv-$name";
900 if ( $text !== null ) {
906 $firstHeadingMsg = (
$name ===
'credits-skin' )
907 ?
'version-skin-colheader-name'
908 :
'version-ext-colheader-name';
911 $this->
msg( $firstHeadingMsg )->
text() );
913 $this->
msg(
'version-ext-colheader-version' )->
text() );
915 $this->
msg(
'version-ext-colheader-license' )->
text() );
917 $this->
msg(
'version-ext-colheader-description' )->
text() );
919 $this->
msg(
'version-ext-colheader-credits' )->
text() );
931 $ip = str_replace(
'--',
' - ', htmlspecialchars( $this->
getRequest()->getIP() ) );
933 return "<!-- visited from $ip -->\n<span style='display:none'>visited from $ip</span>";
961 foreach ( (
array)$authors
as $item ) {
962 if ( $item ==
'...' ) {
968 $this->
msg(
'version-poweredby-others' )->escaped()
971 $text = $this->
msg(
'version-poweredby-others' )->escaped();
974 } elseif ( substr( $item, -5 ) ==
' ...]' ) {
976 $list[] = $this->
getOutput()->parseInline(
977 substr( $item, 0, -4 ) . $this->
msg(
'version-poweredby-others' )->
text() .
"]"
980 $list[] = $this->
getOutput()->parseInline( $item );
987 $this->
msg(
'version-poweredby-others' )->escaped()
1010 foreach ( scandir( $extDir )
as $file ) {
1011 $fullPath = $extDir . DIRECTORY_SEPARATOR . $file;
1012 if ( preg_match(
'/^((AUTHORS)|(CREDITS))(\.txt|\.wiki|\.mediawiki)?$/', $file ) &&
1013 is_readable( $fullPath ) &&
1014 is_file( $fullPath )
1039 foreach ( scandir( $extDir )
as $file ) {
1040 $fullPath = $extDir . DIRECTORY_SEPARATOR . $file;
1041 if ( preg_match(
'/^((COPYING)|(LICENSE))(\.txt)?$/', $file ) &&
1042 is_readable( $fullPath ) &&
1043 is_file( $fullPath )
1061 if ( !count( $list ) ) {
1069 ->listToText( array_map( [ __CLASS__,
'arrayToString' ], $list ) );
1081 if ( is_array( $list ) && count( $list ) == 1 ) {
1084 if ( $list instanceof Closure ) {
1087 } elseif ( is_object( $list ) ) {
1088 $class =
wfMessage(
'parentheses' )->params( get_class( $list ) )->escaped();
1091 } elseif ( !is_array( $list ) ) {
1094 if ( is_object( $list[0] ) ) {
1095 $class = get_class( $list[0] );
1100 return wfMessage(
'parentheses' )->params(
"$class, {$list[1]}" )->escaped();
1111 return $repo->getHeadSHA1();
1120 return $repo->getCurrentBranch();
1129 $scriptPath = $wgScriptPath ? $wgScriptPath :
"/";
1132 'version-entrypoints-scriptpath' => $scriptPath,
1133 'version-entrypoints-index-php' =>
wfScript(
'index' ),
1134 'version-entrypoints-api-php' =>
wfScript(
'api' ),
1135 'version-entrypoints-load-php' =>
wfScript(
'load' ),
1140 'dir' => $language->getDir(),
1141 'lang' => $language->getHtmlCode()
1145 [
'id' =>
'mw-version-entrypoints' ],
1146 $this->
msg(
'version-entrypoints' )->
text()
1150 'class' =>
'wikitable plainlinks',
1151 'id' =>
'mw-version-entrypoints-table',
1160 $this->
msg(
'version-entrypoints-header-entrypoint' )->
text()
1165 $this->
msg(
'version-entrypoints-header-url' )->
text()
1169 foreach ( $entryPoints
as $message =>
$value ) {
static getExtensionTypes()
Returns an array with the base extension types.
static getVersionLinkedGit()
static closeElement($element)
Returns "$element>".
static getExtAuthorsFileName($extDir)
Obtains the full path of an extensions authors or credits file if one exists.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
wfGetDB($db, $groups=[], $wiki=false)
Get a Database object.
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output $out
the array() calling protocol came about after MediaWiki 1.4rc1.
$wgVersion
MediaWiki version number.
wfScript($script= 'index')
Get the path to a specified script file, respecting file extensions; this is a wrapper around $wgScri...
wfIsHHVM()
Check if we are running under HHVM.
static element($element, $attribs=null, $contents= '', $allowShortTag=true)
Format an XML element with given attributes and, optionally, text content.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
static rawElement($element, $attribs=[], $contents= '')
Returns an HTML element in a string.
if(!isset($args[0])) $lang
getExtensionCategory($type, $message)
Creates and returns the HTML for a single extension category.
it s the revision text itself In either if gzip is the revision text is gzipped $flags
$wgHooks['ArticleShow'][]
compare($a, $b)
Callback to sort extensions by type.
msg()
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.
when a variable name is used in a it is silently declared as a new local masking the global
wfExpandUrl($url, $defaultProto=PROTO_CURRENT)
Expand a potentially local URL to a fully-qualified URL.
getParserTags()
Obtains a list of installed parser tags and the associated H2 header.
getParserFunctionHooks()
Obtains a list of installed parser function hooks and the associated H2 header.
wfDebug($text, $dest= 'all', array $context=[])
Sends a line to the debug log if enabled or, optionally, to a comment in output.
openExtType($text=null, $name=null)
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as $wgLang
outputHeader($summaryMessageKey= '')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
static getLocalInstance($ts=false)
Get a timestamp instance in the server local timezone ($wgLocaltimezone)
IPInfo()
Get information about client's IP address.
listToText($list, $sort=true)
Convert an array of items into a list for display.
static closeElement($element)
Shortcut to close an XML element.
Parent class for all special pages.
static openElement($element, $attribs=[])
Identical to rawElement(), but has no third parameter and omits the end tag (and the self-closing '/'...
static getICUVersion()
Return the version of ICU library used by PHP's intl extension, or false when the extension is not in...
wfGetCache($cacheType)
Get a specific cache object.
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock()-offset Set to overwrite offset parameter in $wgRequest set to ''to unsetoffset-wrap String Wrap the message in html(usually something like"<
static getExtensionTypeName($type)
Returns the internationalized name for an extension type.
static getGitCurrentBranch($dir)
getExternalLibraries()
Generate an HTML table for external libraries that are installed.
static openElement($element, $attribs=null)
This opens an XML element.
getWgHooks()
Generate wikitext showing hooks in $wgHooks.
getSkinCredits()
Generate wikitext showing the name, URL, author and description of each skin.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes! ...
static getExtLicenseFileName($extDir)
Obtains the full path of an extensions copying or license file if one exists.
static getwgVersionLinked()
static run($event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
static getVersionLinked()
Return a wikitext-formatted string of the MediaWiki version with a link to the Git SHA1 of head if av...
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
static link($target, $html=null, $customAttribs=[], $query=[], $options=[])
This function returns an HTML link to the given target.
static escapeId($id, $options=[])
Given a value, escape it so that it can be used in an id attribute and return it. ...
getCreditsForExtension($type, array $extension)
Creates and formats a version line for a single extension.
static getCopyrightAndAuthorList()
Get the "MediaWiki is copyright 2001-20xx by lots of cool guys" text.
static makeExternalLink($url, $text, $escape=true, $linktype= '', $attribs=[], $title=null)
Make an external link.
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
static arrayToString($list)
Convert an array or object to a string for display.
$wgScriptPath
The path we should point to.
getExtensionCredits()
Generate wikitext showing the name, URL, author and description of each extension.
static getMediaWikiCredits()
Returns wiki text showing the license information.
getLanguage()
Shortcut to get user's language.
Give information about the version of MediaWiki, PHP, the DB and extensions.
listAuthors($authors, $extName, $extDir)
Return a formatted unsorted list of authors.
wfMemcKey()
Make a cache key for the local wiki.
static softwareInformation()
Returns wiki text showing the third party software versions (apache, php, mysql). ...
Reads an installed.json file and provides accessors to get what is installed.
getRequest()
Get the WebRequest being used for this instance.
static getVersion($flags= '', $lang=null)
Return a string of the MediaWiki version with Git revision if available.
static element($element, $attribs=[], $contents= '')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values before the output is cached one of or reset my talk my contributions etc etc otherwise the built in rate limiting checks are if enabled allows for interception of redirect as a string mapping parameter names to values & $type
getEntryPointInfo()
Get the list of entry points and their URLs.
if the prop value should be in the metadata multi language array format
$coreId
Stores the current rev id/SHA hash of MediaWiki core.
getPageTitle($subpage=false)
Get a self-referential title object.
static getGitHeadSha1($dir)
Allows to change the fields on the form that will be generated $name