Inherited by Namespace.
Static Public Member Functions | |
static | isMovable ($index) |
Can pages in the given namespace be moved? | |
static | isMain ($index) |
Is the given namespace is a subject (non-talk) namespace? | |
static | isTalk ($index) |
Is the given namespace a talk namespace? | |
static | getTalk ($index) |
Get the talk namespace index for a given namespace. | |
static | getSubject ($index) |
Get the subject namespace index for a given namespace. | |
static | exists ($index) |
Returns whether the specified namespace exists. | |
static | getCanonicalName ($index) |
Returns the canonical (English Wikipedia) name for a given index. | |
static | getCanonicalIndex ($name) |
Returns the index for a given canonical name, or NULL The input *must* be converted to lower case first. | |
static | canTalk ($index) |
Can this namespace ever have a talk namespace? | |
static | isContent ($index) |
Does this namespace contain content, for the purposes of calculating statistics, etc? | |
static | isWatchable ($index) |
Can pages in a namespace be watched? | |
static | hasSubpages ($index) |
Does the namespace allow subpages? | |
static | isCapitalized ($index) |
Is the namespace first-letter capitalized? | |
Static Private Attributes | |
static | $alwaysCapitalizedNamespaces = array( NS_SPECIAL, NS_USER, NS_MEDIAWIKI ) |
These namespaces should always be first-letter capitalized, now and forevermore. |
The textual names of the namespaces are handled by Language.php.
These are synonyms for the names given in the language file Users and translators should not change them
Definition at line 46 of file Namespace.php.
static MWNamespace::canTalk | ( | $ | index | ) | [static] |
Can this namespace ever have a talk namespace?
$index | Int: namespace index |
Definition at line 164 of file Namespace.php.
Referenced by Title::canTalk().
static MWNamespace::exists | ( | $ | index | ) | [static] |
Returns whether the specified namespace exists.
Definition at line 114 of file Namespace.php.
References $wgCanonicalNamespaceNames.
Referenced by Title::getNamespaceKey(), Title::getNsText(), Skin::makeGlobalVariablesScript(), and SkinTemplate::outputPage().
static MWNamespace::getCanonicalIndex | ( | $ | name | ) | [static] |
Returns the index for a given canonical name, or NULL The input *must* be converted to lower case first.
$name | String: namespace name |
Definition at line 142 of file Namespace.php.
References $i, $name, and $wgCanonicalNamespaceNames.
Referenced by Language::getNsIndex().
static MWNamespace::getCanonicalName | ( | $ | index | ) | [static] |
Returns the canonical (English Wikipedia) name for a given index.
$index | Int: namespace index |
Definition at line 126 of file Namespace.php.
References $wgCanonicalNamespaceNames.
Referenced by ApiQuerySiteinfo::appendNamespaces(), SpecialListGroupRights::execute(), Linker::formatLinksInCommentCallback(), SpecialStatistics::getGroupStats(), Title::getNamespaceKey(), Title::getNsText(), Skin::makeGlobalVariablesScript(), Title::moveSubpages(), and SkinTemplate::outputPage().
static MWNamespace::getSubject | ( | $ | index | ) | [static] |
Get the subject namespace index for a given namespace.
$index | Int: Namespace index |
Definition at line 105 of file Namespace.php.
References isTalk().
Referenced by WatchedItem::addWatch(), Title::getNamespaceKey(), Title::getSubjectNsText(), Title::getSubjectPage(), ApiQueryInfo::getTSIDs(), isCapitalized(), SpecialSearch::powerSearchBox(), WatchedItem::removeWatch(), and SkinTemplate::tabAction().
static MWNamespace::getTalk | ( | $ | index | ) | [static] |
Get the talk namespace index for a given namespace.
$index | Int: namespace index |
Definition at line 93 of file Namespace.php.
References isTalk().
Referenced by WatchedItem::addWatch(), Title::getTalkNsText(), Title::getTalkPage(), ApiQueryInfo::getTSIDs(), and WatchedItem::removeWatch().
static MWNamespace::hasSubpages | ( | $ | index | ) | [static] |
Does the namespace allow subpages?
$index | int Index to check |
Definition at line 196 of file Namespace.php.
References $wgNamespacesWithSubpages.
Referenced by ApiQuerySiteinfo::appendNamespaces(), Parser::areSubpagesAllowed(), MovePageForm::doSubmit(), EditPage::edit(), Title::getBaseText(), Title::getSubpages(), Title::getSubpageText(), Title::hasSubpages(), Title::moveSubpages(), Linker::normalizeSubpageLink(), MovePageForm::showSubpages(), and subPageSubtitle().
static MWNamespace::isCapitalized | ( | $ | index | ) | [static] |
Is the namespace first-letter capitalized?
$index | int Index to check |
Definition at line 207 of file Namespace.php.
References $wgCapitalLinkOverrides, $wgCapitalLinks, and getSubject().
Referenced by FileRepo::__construct(), ApiQuerySiteinfo::appendNamespaces(), Title::capitalize(), FileRepo::getNameFromTitle(), and XmlDumpWriter::namespaces().
static MWNamespace::isContent | ( | $ | index | ) | [static] |
Does this namespace contain content, for the purposes of calculating statistics, etc?
$index | Int: index to check |
Definition at line 175 of file Namespace.php.
References $wgContentNamespaces.
Referenced by ApiQuerySiteinfo::appendNamespaces(), Linker::getLinkColour(), and Title::isContentPage().
static MWNamespace::isMain | ( | $ | index | ) | [static] |
Is the given namespace is a subject (non-talk) namespace?
$index | Int: namespace index |
Definition at line 72 of file Namespace.php.
References isTalk().
Referenced by GenerateSitemap::guessPriority().
static MWNamespace::isMovable | ( | $ | index | ) | [static] |
Can pages in the given namespace be moved?
$index | Int: namespace index |
Definition at line 61 of file Namespace.php.
References $wgAllowImageMoving.
Referenced by Title::getUserPermissionsErrorsInternal().
static MWNamespace::isTalk | ( | $ | index | ) | [static] |
Is the given namespace a talk namespace?
$index | Int: namespace index |
Definition at line 82 of file Namespace.php.
Referenced by getSubject(), getTalk(), ApiQueryInfo::getTSIDs(), isMain(), Title::isTalkPage(), and DumpNotalkFilter::pass().
static MWNamespace::isWatchable | ( | $ | index | ) | [static] |
Can pages in a namespace be watched?
$index | Int |
Definition at line 186 of file Namespace.php.
MWNamespace::$alwaysCapitalizedNamespaces = array( NS_SPECIAL, NS_USER, NS_MEDIAWIKI ) [static, private] |
These namespaces should always be first-letter capitalized, now and forevermore.
Historically, they could've probably been lowercased too, but some things are just too ingrained now. :)
Definition at line 53 of file Namespace.php.