当前位置: 首页>>代码示例>>PHP>>正文


PHP MWNamespace::getTalkNamespaces方法代码示例

本文整理汇总了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");
 }
开发者ID:MediaWiki-stable,项目名称:1.26.1,代码行数:11,代码来源:MWNamespaceTest.php

示例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;
开发者ID:nomoa,项目名称:operations-mediawiki-config,代码行数:31,代码来源:Wikibase.php


注:本文中的MWNamespace::getTalkNamespaces方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。