Manual:NamespaceInfo.php

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()