本文整理汇总了PHP中MWNamespace::getTalkNamespaces方法的典型用法代码示例。如果您正苦于以下问题:PHP MWNamespace::getTalkNamespaces方法的具体用法?PHP MWNamespace::getTalkNamespaces怎么用?PHP MWNamespace::getTalkNamespaces使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MWNamespace
的用法示例。
在下文中一共展示了MWNamespace::getTalkNamespaces方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetTalkNamespaces
/**
* @covers MWNamespace::getTalkNamespaces
*/
public function testGetTalkNamespaces()
{
$talkNS = MWNamespace::getTalkNamespaces();
$this->assertContains(NS_TALK, $talkNS, "Subject namespaces should have NS_TALK");
$this->assertNotContains(NS_MAIN, $talkNS, "Subject namespaces should not have NS_MAIN");
$this->assertNotContains(NS_MEDIA, $talkNS, "Subject namespaces should not have NS_MEDIA");
$this->assertNotContains(NS_SPECIAL, $talkNS, "Subject namespaces should not have NS_SPECIAL");
}
示例2: array
// Note: Wikibase-production.php overrides this for the test wikis
$wgWBClientSettings['changesDatabase'] = 'wikidatawiki';
$wgWBClientSettings['repoDatabase'] = 'wikidatawiki';
$wgWBClientSettings['repoUrl'] = "//{$wmfHostnames['wikidata']}";
$wgWBClientSettings['repoNamespaces'] = array('wikibase-item' => '', 'wikibase-property' => 'Property');
$wgWBClientSettings['languageLinkSiteGroup'] = $wmgWikibaseSiteGroup;
if (in_array($wgDBname, array('commonswiki', 'mediawikiwiki', 'metawiki', 'specieswiki'))) {
$wgWBClientSettings['languageLinkSiteGroup'] = 'wikipedia';
}
$wgWBClientSettings['siteGroup'] = $wmgWikibaseSiteGroup;
$wgWBClientSettings['otherProjectsLinksBeta'] = true;
$wgWBClientSettings['excludeNamespaces'] = function () {
// @fixme 102 is LiquidThread comments on wikinews and elsewhere?
// but is the Extension: namespace on mediawiki.org, so we need
// to allow wiki-specific settings here.
return array_merge(MWNamespace::getTalkNamespaces(), array(NS_USER, NS_FILE, NS_MEDIAWIKI, 90, 92, 118, 1198, 2600));
};
if ($wgDBname === 'wikidatawiki' || $wgDBname === 'testwikidatawiki') {
$wgWBClientSettings['namespaces'] = array(NS_CATEGORY, NS_PROJECT, NS_TEMPLATE, NS_HELP);
$wgWBClientSettings['languageLinkSiteGroup'] = 'wikipedia';
$wgWBClientSettings['injectRecentChanges'] = false;
$wgWBClientSettings['showExternalRecentChanges'] = false;
}
foreach ($wmgWikibaseClientSettings as $setting => $value) {
$wgWBClientSettings[$setting] = $value;
}
$wgWBClientSettings['allowDataTransclusion'] = $wmgWikibaseEnableData;
$wgWBClientSettings['allowArbitraryDataAccess'] = $wmgWikibaseEnableArbitraryAccess;
$wgWBClientSettings['entityAccessLimit'] = $wmgWikibaseEntityAccessLimit;
$wgWBClientSettings['sharedCacheKeyPrefix'] .= $wgWBSharedCacheKey;
$wgWBClientSettings['sharedCacheDuration'] = 60 * 60 * 24;