Manual:NamespaceInfo.php
Appearance
MediaWiki file: NamespaceInfo.php | |
---|---|
Location: | includes/title/ |
Source code: | master • 1.42.3 • 1.41.4 • 1.39.10 |
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()