本文整理匯總了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;