Jump to content
MediaWiki

Manual:NamespaceInfo.php

From mediawiki.org
MediaWiki file: NamespaceInfo.php
Location: includes/title/
Source code: master1.43.01.42.51.39.11
Classes: MediaWiki\Title\NamespaceInfo

A utility class for dealing with namespaces that encodes all the "magic" behaviors of them based on index. The textual names of the namespaces are handled by Language.php.

Instantiation

[edit ]

Example:

$namespaceInfo = MediaWikiServices::getInstance()->getNamespaceInfo(); 
$canonProjectNamespaceName = $namespaceInfo->getCanonicalName( 4 ); // Project

Public methods

[edit ]

@todo

  • isMovable()
  • isSubject()
  • isTalk()
  • getTalk()
  • getTalkPage()
  • canHaveTalkPage()
  • getSubject()
  • getSubjectPage()
  • getAssociated()
  • getAssociatedPage()
  • exists()
  • equals()
  • subjectEquals()
  • getCanonicalNamespaces()
  • getCanonicalName()
  • getCanonicalIndex()
  • getValidNamespaces()
  • hasTalkNamespace()
  • isContent()
  • wantSignatures()
  • isWatchable()
  • hasSubpages()
  • getContentNamespaces()
  • getSubjectNamespaces()
  • getTalkNamespaces()
  • isCapitalized()
  • hasGenderDistinction()
  • isNonincludable()
  • getNamespaceContentModel()
  • getCategoryLinkType()
  • getCommonNamespaces()
Deprecated or removed
  • getRestrictionLevels() - use PermissionManager::getNamespaceRestrictionLevels()

AltStyle によって変換されたページ (->オリジナル) /