MediaWiki
1.23.2
|
A title formatter service for MediaWiki. More...
Public Member Functions | |
formatTitle ( $namespace, $text, $fragment='') | |
Returns the title formatted for display. More... | |
getFullText (TitleValue $title) | |
Returns the title formatted for display, with namespace and fragment. More... | |
getNamespaceName ( $namespace, $text) | |
Returns the name of the namespace for the given title. More... | |
getPrefixedText (TitleValue $title) | |
Returns the title formatted for display, including the namespace name. More... | |
getText (TitleValue $title) | |
Returns the title text formatted for display, without namespace of fragment. More... | |
A title formatter service for MediaWiki.
This is designed to encapsulate knowledge about conventions for the title forms to be used in the database, in urls, in wikitext, etc.
Definition at line 33 of file TitleFormatter.php.
TitleFormatter::formatTitle | ( | $namespace, | |
$text, | |||
$fragment = '' |
|||
) |
Returns the title formatted for display.
Per default, this includes the namespace but not the fragment.
int | bool | $namespace | The namespace ID (or false, if the namespace should be ignored) |
string | $text | The page title |
string | $fragment | The fragment name (may be empty). |
Implemented in MediaWikiTitleCodec.
TitleFormatter::getFullText | ( | TitleValue | $title | ) |
Returns the title formatted for display, with namespace and fragment.
TitleValue | $title | the title to format |
Implemented in MediaWikiTitleCodec.
TitleFormatter::getNamespaceName | ( | $namespace, | |
$text | |||
) |
Returns the name of the namespace for the given title.
int | $namespace | |
string | $text |
InvalidArgumentException |
Implemented in MediaWikiTitleCodec.
TitleFormatter::getPrefixedText | ( | TitleValue | $title | ) |
Returns the title formatted for display, including the namespace name.
TitleValue | $title | the title to format |
Implemented in MediaWikiTitleCodec.
TitleFormatter::getText | ( | TitleValue | $title | ) |
Returns the title text formatted for display, without namespace of fragment.
TitleValue | $title | the title to format |
Implemented in MediaWikiTitleCodec.