35use Psr\Log\LoggerAwareInterface;
36use Psr\Log\LoggerInterface;
38use Wikimedia\ScopedCallback;
44define(
'MSG_CACHE_VERSION', 2 );
64 private const WAN_TTL = IExpiringStore::TTL_DAY;
141 return MediaWikiServices::getInstance()->getMessageCache();
151 $lckey = strtr( $key,
' ',
'_' );
152 if ( ord( $lckey ) < 128 ) {
153 $lckey[0] = strtolower( $lckey[0] );
155 $lckey = MediaWikiServices::getInstance()->getContentLanguage()->lcfirst( $lckey );
184 LoggerInterface $logger,
192 $this->wanCache = $wanCache;
193 $this->clusterCache = $clusterCache;
194 $this->srvCache = $serverCache;
195 $this->contLang = $contLang;
196 $this->contLangConverter = $contLangConverter;
197 $this->contLangCode = $contLang->
getCode();
198 $this->logger = $logger;
199 $this->langFactory = $langFactory;
200 $this->localisationCache = $localisationCache;
201 $this->languageNameUtils = $languageNameUtils;
202 $this->languageFallback = $languageFallback;
203 $this->hookRunner =
new HookRunner( $hookContainer );
207 $this->mDisable = !( $options[
'useDB'] ??
true );
211 $this->logger = $logger;
220 if ( !$this->mParserOptions ) {
221 $user = RequestContext::getMain()->getUser();
222 if ( !$user->isSafeToLoad() ) {
226 $po = ParserOptions::newFromAnon();
227 $po->setAllowUnsafeRawHtml(
false );
235 $this->mParserOptions->setAllowUnsafeRawHtml(
false );
238 return $this->mParserOptions;
248 $cacheKey = $this->srvCache->makeKey( __CLASS__, $code );
250 return $this->srvCache->get( $cacheKey );
260 $cacheKey = $this->srvCache->makeKey( __CLASS__, $code );
261 $this->srvCache->set( $cacheKey,
$cache );
285 protected function load( $code, $mode =
null ) {
286 if ( !is_string( $code ) ) {
287 throw new InvalidArgumentException(
"Missing language code" );
290 # Don't do double loading...
295 # 8 lines of code just to say (once) that message cache is disabled
296 if ( $this->mDisable ) {
297 static $shownDisabled =
false;
298 if ( !$shownDisabled ) {
299 $this->logger->debug( __METHOD__ .
': disabled' );
300 $shownDisabled =
true;
306 # Loading code starts
307 $success =
false; # Keep track of success
308 $staleCache =
false; # a cache array with expired data, or
false if none has been loaded
309 $where = []; # Debug info, delayed to avoid spamming debug log too much
311 # Hash of the contents is stored in memcache, to detect if data-center cache
312 # or local cache goes out of date (e.g. due to replace() on some other server)
314 $this->cacheVolatile[$code] = $hashVolatile;
316 # Try the local cache and check against the cluster hash key...
319 $where[] =
'local cache is empty';
320 } elseif ( !isset(
$cache[
'HASH'] ) ||
$cache[
'HASH'] !== $hash ) {
321 $where[] =
'local cache has the wrong hash';
324 $where[] =
'local cache is expired';
326 } elseif ( $hashVolatile ) {
327 $where[] =
'local cache validation key is expired/volatile';
330 $where[] =
'got from local cache';
331 $this->cache->set( $code,
$cache );
336 $cacheKey = $this->clusterCache->makeKey(
'messages', $code );
337 # Try the global cache. If it is empty, try to acquire a lock. If
338 # the lock can't be acquired, wait for the other thread to finish
339 # and then try the global cache a second time.
340 for ( $failedAttempts = 0; $failedAttempts <= 1; $failedAttempts++ ) {
341 if ( $hashVolatile && $staleCache ) {
342 # Do not bother fetching the whole cache blob to avoid I/O.
343 # Instead, just try to get the non-blocking $statusKey lock
344 # below, and use the local stale value if it was not acquired.
345 $where[] =
'global cache is presumed expired';
347 $cache = $this->clusterCache->get( $cacheKey );
349 $where[] =
'global cache is empty';
351 $where[] =
'global cache is expired';
353 } elseif ( $hashVolatile ) {
354 # DB results are replica DB lag prone until the holdoff TTL passes.
355 # By then, updates should be reflected in loadFromDBWithLock().
356 # One thread regenerates the cache while others use old values.
357 $where[] =
'global cache is expired/volatile';
360 $where[] =
'got from global cache';
361 $this->cache->set( $code,
$cache );
368 # Done, no need to retry
372 # We need to call loadFromDB. Limit the concurrency to one process.
373 # This prevents the site from going down when the cache expires.
374 # Note that the DB slam protection lock here is non-blocking.
376 if ( $loadStatus ===
true ) {
379 } elseif ( $staleCache ) {
380 # Use the stale cache while some other thread constructs the new one
381 $where[] =
'using stale cache';
382 $this->cache->set( $code, $staleCache );
385 } elseif ( $failedAttempts > 0 ) {
386 # Already blocked once, so avoid another lock/unlock cycle.
387 # This case will typically be hit if memcached is down, or if
388 # loadFromDB() takes longer than LOCK_WAIT.
389 $where[] =
"could not acquire status key.";
391 } elseif ( $loadStatus ===
'cantacquire' ) {
392 # Wait for the other thread to finish, then retry. Normally,
393 # the memcached get() will then yield the other thread's result.
394 $where[] =
'waited for other thread to complete';
397 # Disable cache; $loadStatus is 'disabled'
404 $where[] =
'loading FAILED - cache is disabled';
405 $this->mDisable =
true;
406 $this->cache->set( $code, [] );
407 $this->logger->error( __METHOD__ .
": Failed to load $code" );
408 # This used to throw an exception, but that led to nasty side effects like
409 # the whole wiki being instantly down if the memcached server died
413 throw new LogicException(
"Process cache for '$code' should be set by now." );
416 $info = implode(
', ', $where );
417 $this->logger->debug( __METHOD__ .
": Loading $code... $info" );
429 # If cache updates on all levels fail, give up on message overrides.
430 # This is to avoid easy site outages; see $saveSuccess comments below.
431 $statusKey = $this->clusterCache->makeKey(
'messages', $code,
'status' );
432 $status = $this->clusterCache->get( $statusKey );
433 if ( $status ===
'error' ) {
434 $where[] =
"could not load; method is still globally disabled";
438 # Now let's regenerate
439 $where[] =
'loading from database';
441 # Lock the cache to prevent conflicting writes.
442 # This lock is non-blocking so stale cache can quickly be used.
443 # Note that load() will call a blocking getReentrantScopedLock()
444 # after this if it really need to wait for any current thread.
445 $cacheKey = $this->clusterCache->makeKey(
'messages', $code );
447 if ( !$scopedLock ) {
448 $where[] =
'could not acquire main lock';
449 return 'cantacquire';
453 $this->cache->set( $code,
$cache );
456 if ( !$saveSuccess ) {
471 $this->clusterCache->set( $statusKey,
'error', 60 * 5 );
472 $where[] =
'could not save cache, disabled globally for 5 minutes';
474 $where[] =
"could not save global cache";
503 if ( !$this->cache->has( $this->contLangCode ) ) {
504 $this->
load( $this->contLangCode );
506 $mostused = array_keys( $this->cache->get( $this->contLangCode ) );
507 foreach ( $mostused as $key => $value ) {
508 $mostused[$key] =
"$value/$code";
514 'page_is_redirect' => 0,
517 if ( count( $mostused ) ) {
518 $conds[
'page_title'] = $mostused;
519 } elseif ( $code !== $this->contLangCode ) {
520 $conds[] =
'page_title' .
$dbr->buildLike(
$dbr->anyString(),
'/', $code );
522 # Effectively disallows use of '/' character in NS_MEDIAWIKI for uses
523 # other than language code.
524 $conds[] =
'page_title NOT' .
525 $dbr->buildLike(
$dbr->anyString(),
'/',
$dbr->anyString() );
531 [
'page_title',
'page_latest' ],
533 __METHOD__ .
"($code)-big"
535 foreach (
$res as $row ) {
539 $cache[$row->page_title] =
'!TOO BIG';
542 $cache[
'EXCESSIVE'][$row->page_title] = $row->page_latest;
547 $revisionStore = MediaWikiServices::getInstance()->getRevisionStore();
549 $revQuery = $revisionStore->getQueryInfo( [
'page' ] );
562 array_diff(
$revQuery[
'tables'], [
'page' ] )
568 array_merge( $conds, [
570 'page_latest = rev_id'
572 __METHOD__ .
"($code)-small",
576 $result = $revisionStore->newRevisionsFromBatch(
$res, [
577 'slots' => [ SlotRecord::MAIN ],
580 $revisions = $result->isOK() ? $result->getValue() : [];
581 foreach (
$res as $row ) {
586 $rev = $revisions[$row->rev_id] ??
null;
587 $content = $rev ? $rev->getContent( SlotRecord::MAIN ) :
null;
589 }
catch ( Exception $ex ) {
593 if ( !is_string( $text ) ) {
595 $this->logger->error(
597 .
": failed to load message page text for {$row->page_title} ($code)"
600 $entry =
' ' . $text;
602 $cache[$row->page_title] = $entry;
606 $cache[
'EXCESSIVE'][$row->page_title] = $row->page_latest;
613 # Hash for validating local cache (APC). No need to take into account
614 # messages larger than $wgMaxMsgCacheEntrySize, since those are only
615 # stored and fetched from memcache.
618 unset(
$cache[
'EXCESSIVE'] );
636 return $this->cache->hasField(
$lang,
'VERSION' );
652 $name = $this->contLang->lcfirst( $name );
655 if ( strpos( $name,
'conversiontable/' ) === 0 ) {
658 $msg = preg_replace(
'/\/[a-z0-9-]{2,}$/',
'', $name );
660 if ( $code ===
null ) {
662 if ( $this->systemMessageNames ===
null ) {
663 $this->systemMessageNames = array_fill_keys(
664 $this->localisationCache->getSubitemList( $this->contLangCode,
'messages' ),
667 return isset( $this->systemMessageNames[$msg] );
670 return $this->localisationCache->getSubitem( $code,
'messages', $msg ) !==
null;
681 if ( $this->mDisable ) {
686 if ( strpos(
$title,
'/' ) !==
false && $code === $this->contLangCode ) {
692 if ( $text ===
false ) {
694 $this->cache->setField( $code,
$title,
'!NONEXISTENT' );
697 $this->cache->setField( $code,
$title,
' ' . $text );
701 DeferredUpdates::addUpdate(
703 DeferredUpdates::PRESEND
717 $this->clusterCache->makeKey(
'messages', $code )
719 if ( !$scopedLock ) {
720 foreach ( $replacements as list(
$title ) ) {
721 $this->logger->error(
722 __METHOD__ .
': could not acquire lock to update {title} ({code})',
723 [
'title' =>
$title,
'code' => $code ] );
731 if ( $this->
load( $code, self::FOR_UPDATE ) ) {
732 $cache = $this->cache->get( $code );
738 $newTextByTitle = [];
740 foreach ( $replacements as list(
$title ) ) {
742 $page->loadPageData( $page::READ_LATEST );
745 $newTextByTitle[
$title] = $text;
747 if ( !is_string( $text ) ) {
751 $newBigTitles[
$title] = $page->getLatest();
762 foreach ( $newBigTitles as
$title => $id ) {
764 $this->wanCache->set(
766 ' ' . $newTextByTitle[
$title],
772 $cache[
'LATEST'] = time();
774 $this->cache->set( $code,
$cache );
781 ScopedCallback::consume( $scopedLock );
785 $this->wanCache->touchCheckKey( $this->
getCheckKey( $code ) );
788 $blobStore = MediaWikiServices::getInstance()->getResourceLoader()->getMessageBlobStore();
789 foreach ( $replacements as list(
$title, $msg ) ) {
790 $blobStore->updateMessage( $this->contLang->lcfirst( $msg ) );
791 $this->hookRunner->onMessageCacheReplace(
$title, $newTextByTitle[
$title] );
802 if ( !isset(
$cache[
'VERSION'] ) || !isset(
$cache[
'EXPIRY'] ) ) {
825 if ( $dest ===
'all' ) {
826 $cacheKey = $this->clusterCache->makeKey(
'messages', $code );
846 $value = $this->wanCache->get(
847 $this->wanCache->makeKey(
'messages', $code,
'hash',
'v1' ),
849 [ $this->getCheckKey( $code ) ]
853 $hash = $value[
'hash'];
854 if ( ( time() - $value[
'latest'] ) < WANObjectCache::TTL_MINUTE ) {
861 $expired = ( $curTTL < 0 );
869 return [ $hash, $expired ];
883 $this->wanCache->set(
884 $this->wanCache->makeKey(
'messages', $code,
'hash',
'v1' ),
887 'latest' =>
$cache[
'LATEST'] ?? 0
889 WANObjectCache::TTL_INDEFINITE
899 return $this->clusterCache->getScopedLock( $key, $timeout, self::LOCK_TTL, __METHOD__ );
935 public function get( $key, $useDB =
true, $langcode =
true ) {
936 if ( is_int( $key ) ) {
940 } elseif ( !is_string( $key ) ) {
942 } elseif ( $key ===
'' ) {
948 $lckey = self::normalizeKey( $key );
950 $this->hookRunner->onMessageCache__get( $lckey );
956 !$this->mDisable && $useDB
960 if ( $message ===
false ) {
961 $parts = explode(
'/', $lckey );
965 if ( count( $parts ) == 2 && $parts[1] !==
'' ) {
966 $message = $this->localisationCache->getSubitem( $parts[1],
'messages', $parts[0] );
967 if ( $message ===
null ) {
974 if ( $message !==
false ) {
976 $message = str_replace(
978 # Fix
for trailing whitespace, removed by textarea
980 # Fix
for NBSP, converted to space by firefox
1015 if ( $message !==
false ) {
1020 $message = $this->
getMessageForLang( $this->contLang, $lckey, $useDB, $alreadyTried );
1035 $langcode =
$lang->getCode();
1039 $uckey = $this->contLang->ucfirst( $lckey );
1041 if ( !isset( $alreadyTried[$langcode] ) ) {
1046 if ( $message !==
false ) {
1049 $alreadyTried[$langcode] =
true;
1056 $message =
$lang->getMessage( $lckey );
1057 if ( $message !==
null ) {
1063 $fallbackChain = $this->languageFallback->getAll( $langcode );
1065 foreach ( $fallbackChain as $code ) {
1066 if ( isset( $alreadyTried[$code] ) ) {
1073 if ( $message !==
false ) {
1076 $alreadyTried[$code] =
true;
1091 if ( $langcode === $this->contLangCode ) {
1095 return "$uckey/$langcode";
1115 $this->
load( $code );
1117 $entry = $this->cache->getField( $code,
$title );
1119 if ( $entry !==
null ) {
1121 if ( substr( $entry, 0, 1 ) ===
' ' ) {
1123 return (
string)substr( $entry, 1 );
1124 } elseif ( $entry ===
'!NONEXISTENT' ) {
1133 $this->cache->getField( $code,
'HASH' )
1144 $this->cache->getField( $code,
'HASH' )
1147 if ( $entry ===
null || substr( $entry, 0, 1 ) !==
' ' ) {
1150 $this->hookRunner->onMessagesPreLoad(
$title, $message, $code );
1151 if ( $message !==
false ) {
1152 $this->cache->setField( $code,
$title,
' ' . $message );
1154 $this->cache->setField( $code,
$title,
'!NONEXISTENT' );
1161 if ( $entry !==
false && substr( $entry, 0, 1 ) ===
' ' ) {
1162 if ( $this->cacheVolatile[$code] ) {
1164 $this->logger->debug(
1165 __METHOD__ .
': loading volatile key \'{titleKey}\'',
1166 [
'titleKey' =>
$title,
'code' => $code ] );
1168 $this->cache->setField( $code,
$title, $entry );
1171 return (
string)substr( $entry, 1 );
1174 $this->cache->setField( $code,
$title,
'!NONEXISTENT' );
1186 $fname = __METHOD__;
1187 return $this->srvCache->getWithSetCallback(
1188 $this->srvCache->makeKey(
'messages-big', $hash, $dbKey ),
1189 BagOStuff::TTL_HOUR,
1190 function () use ( $code, $dbKey, $hash, $fname ) {
1191 return $this->wanCache->getWithSetCallback(
1194 function ( $oldValue, &$ttl, &$setOpts ) use ( $dbKey, $code, $fname ) {
1201 $revision = MediaWikiServices::getInstance()
1202 ->getRevisionLookup()
1203 ->getKnownCurrentRevision(
$title );
1207 return '!NONEXISTENT';
1209 $content = $revision->getContent( SlotRecord::MAIN );
1213 $this->logger->warning(
1214 $fname .
': failed to load page text for \'{titleKey}\'',
1215 [
'titleKey' => $dbKey,
'code' => $code ]
1220 if ( !is_string( $message ) ) {
1225 return '!NONEXISTENT';
1228 return ' ' . $message;
1244 if ( strpos( $message,
'{{' ) ===
false ) {
1248 if ( $this->mInParser ) {
1255 $popts->setInterfaceMessage( $interface );
1256 $popts->setTargetLanguage( $language );
1258 $userlang = $popts->setUserLang( $language );
1259 $this->mInParser =
true;
1260 $message = $parser->transformMsg( $message, $popts, $page );
1261 $this->mInParser =
false;
1262 $popts->setUserLang( $userlang );
1272 if ( !$this->mParser ) {
1273 $parser = MediaWikiServices::getInstance()->getParser();
1274 # Clone it and store it
1275 $this->mParser = clone $parser;
1278 return $this->mParser;
1290 $interface =
false, $language =
null
1294 if ( $this->mInParser ) {
1295 return htmlspecialchars( $text );
1300 $popts->setInterfaceMessage( $interface );
1302 if ( is_string( $language ) ) {
1303 $language = $this->langFactory->getLanguage( $language );
1305 $popts->setTargetLanguage( $language );
1308 $logger = LoggerFactory::getInstance(
'GlobalTitleFail' );
1310 __METHOD__ .
' called with no title set.',
1311 [
'exception' =>
new Exception ]
1317 # It's not uncommon having a null $wgTitle in scripts. See r80898
1318 # Create a ghost title in such case
1319 $page = PageReferenceValue::localReference(
1321 'Badtitle/title not set in ' . __METHOD__
1325 $this->mInParser =
true;
1326 $res = $parser->parse( $text, $page, $popts, $linestart );
1327 $this->mInParser =
false;
1333 $this->mDisable =
true;
1337 $this->mDisable =
false;
1353 return $this->mDisable;
1362 $langs = $this->languageNameUtils->getLanguageNames(
null,
'mw' );
1363 foreach ( array_keys( $langs ) as $code ) {
1364 $this->wanCache->touchCheckKey( $this->
getCheckKey( $code ) );
1366 $this->cache->clear();
1374 $pieces = explode(
'/', $key );
1375 if ( count( $pieces ) < 2 ) {
1376 return [ $key, $this->contLangCode ];
1379 $lang = array_pop( $pieces );
1380 if ( !$this->languageNameUtils->getLanguageName(
$lang,
null,
'mw' ) ) {
1381 return [ $key, $this->contLangCode ];
1384 $message = implode(
'/', $pieces );
1386 return [ $message,
$lang ];
1398 $this->
load( $code );
1399 if ( !$this->cache->has( $code ) ) {
1404 $cache = $this->cache->get( $code );
1405 unset(
$cache[
'VERSION'] );
1406 unset(
$cache[
'EXPIRY'] );
1407 unset(
$cache[
'EXCESSIVE'] );
1412 return array_map( [ $this->contLang,
'lcfirst' ], array_keys(
$cache ) );
1424 if ( $msgText ===
null ) {
1430 if ( $this->contLangConverter->hasVariants() ) {
1431 $this->contLangConverter->updateConversionTable( $linkTarget );
1440 return $this->wanCache->makeKey(
'messages', $code );
1455 $msgText =
$content->getWikitextForTransclusion();
1456 if ( $msgText ===
false || $msgText ===
null ) {
1459 $this->logger->warning(
1460 __METHOD__ .
": message content doesn't provide wikitext "
1461 .
"(content model: " .
$content->getModel() .
")" );
1477 return $this->wanCache->makeKey(
'messages-big', $hash,
$title );
$wgAdaptiveMessageCache
Instead of caching everything, only cache those messages which have been customised in the site conte...
$wgMaxMsgCacheEntrySize
Maximum entry size in the message cache, in bytes.
wfGetLangObj( $langcode=false)
Return a Language object from $langcode.
wfTimestampNow()
Convenience function; returns MediaWiki timestamp for the present time.
wfGetDB( $db, $groups=[], $wiki=false)
Get a Database object.
wfTimestamp( $outputtype=TS_UNIX, $ts=0)
Get a timestamp string in one of various formats.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
const MSG_CACHE_VERSION
MediaWiki message cache structure version.
Class representing a cache/ephemeral data store.
A BagOStuff object with no objects in it.
Internationalisation code See https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation for more...
getCode()
Get the internal language code for this language object.
Class for caching the contents of localisation files, Messages*.php and *.i18n.php.
Handles a simple LRU key/value map with a maximum number of entries.
Message cache purging and in-place update handler for specific message page changes.
Cache of messages that are defined by MediaWiki namespace pages or by hooks.
getValidationHash( $code)
Get the md5 used to validate the local APC cache.
isLanguageLoaded( $lang)
Whether the language was loaded and its data is still in the process cache.
loadFromDBWithLock( $code, array &$where, $mode=null)
const LOCK_TTL
How long memcached locks last.
loadFromDB( $code, $mode=null)
Loads cacheable messages from the database.
getMessageForLang( $lang, $lckey, $useDB, &$alreadyTried)
Given a language, try and fetch messages from that language and its fallbacks.
saveToLocalCache( $code, $cache)
Save the cache to APC.
LanguageFactory $langFactory
getMessagePageName( $langcode, $uckey)
Get the message page name for a given language.
saveToCaches(array $cache, $dest, $code=false)
Shortcut to update caches.
__construct(WANObjectCache $wanCache, BagOStuff $clusterCache, BagOStuff $serverCache, Language $contLang, ILanguageConverter $contLangConverter, LoggerInterface $logger, array $options, LanguageFactory $langFactory, LocalisationCache $localisationCache, LanguageNameUtils $languageNameUtils, LanguageFallback $languageFallback, HookContainer $hookContainer)
refreshAndReplaceInternal( $code, array $replacements)
setValidationHash( $code, array $cache)
Set the md5 used to validate the local disk cache.
isCacheExpired( $cache)
Is the given cache array expired due to time passing or a version change?
getMsgFromNamespace( $title, $code)
Get a message from the MediaWiki namespace, with caching.
getReentrantScopedLock( $key, $timeout=self::WAIT_SEC)
const WAIT_SEC
How long to wait for memcached locks.
bool $mDisable
Should mean that database cannot be used, but check.
getLocalCache( $code)
Try to load the cache from APC.
parse( $text, PageReference $page=null, $linestart=true, $interface=false, $language=null)
transform( $message, $interface=false, $language=null, PageReference $page=null)
LocalisationCache $localisationCache
LanguageNameUtils $languageNameUtils
isMainCacheable( $name, $code=null)
Can the given DB key be added to the main cache blob? To reduce the impact of abuse of the MediaWiki ...
LanguageFallback $languageFallback
load( $code, $mode=null)
Loads messages from caches or from database in this order: (1) local message cache (if $wgUseLocalMes...
updateMessageOverride(LinkTarget $linkTarget, Content $content=null)
Purge message caches when a MediaWiki: page is created, updated, or deleted.
getMessageFromFallbackChain( $lang, $lckey, $useDB)
Given a language, try and fetch messages from that language.
isDisabled()
Whether DB/cache usage is disabled for determining messages.
setLogger(LoggerInterface $logger)
loadCachedMessagePageEntry( $dbKey, $code, $hash)
getMessageTextFromContent(Content $content=null)
clear()
Clear all stored messages in global and local cache.
static singleton()
Get the singleton instance of this class.
getAllMessageKeys( $code)
Get all message keys stored in the message cache for a given language.
MapCacheLRU $cache
Process cache of loaded messages that are defined in MediaWiki namespace.
static normalizeKey( $key)
Normalize message key input.
bool[] $cacheVolatile
Map of (language code => boolean)
array $systemMessageNames
Map of (lowercase message key => unused) for all software defined messages.
ParserOptions $mParserOptions
Message cache has its own parser which it uses to transform messages.
ILanguageConverter $contLangConverter
replace( $title, $text)
Updates cache as necessary when message page is changed.
getParserOptions()
ParserOptions is lazy initialised.
bigMessageCacheKey( $hash, $title)
Set options of the Parser.
PHP Parser - Processes wiki markup (which uses a more user-friendly syntax, such as "[[link]]" for ma...
Multi-datacenter aware caching interface.
Base interface for content objects.
The shared interface for all language converters.
if(!isset( $args[0])) $lang