MediaWiki REL1_41
|
A title formatter service for MediaWiki. More...
Inherited by MediaWiki\Title\MediaWikiTitleCodec.
Public Member Functions | |
formatTitle ( $namespace, $text, $fragment='', $interwiki='') | |
Returns the title formatted for display. | |
getFullText ( $title) | |
Returns the title formatted for display, with namespace and fragment. | |
getNamespaceName ( $namespace, $text) | |
Returns the name of the namespace for the given title. | |
getPrefixedDBkey ( $target) | |
Return the title in prefixed database key form, with interwiki and namespace. | |
getPrefixedText ( $title) | |
Returns the title formatted for display, including the namespace name. | |
getText ( $title) | |
Returns the title text formatted for display, without namespace or fragment. | |
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 39 of file TitleFormatter.php.
MediaWiki\Title\TitleFormatter::formatTitle | ( | $namespace, | |
$text, | |||
$fragment = '', | |||
$interwiki = '' ) |
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). |
string | $interwiki | The interwiki prefix (may be empty). |
Implemented in MediaWiki\Title\MediaWikiTitleCodec.
MediaWiki\Title\TitleFormatter::getFullText | ( | $title | ) |
Returns the title formatted for display, with namespace and fragment.
LinkTarget | PageReference | $title | The title to format |
Implemented in MediaWiki\Title\MediaWikiTitleCodec.
MediaWiki\Title\TitleFormatter::getNamespaceName | ( | $namespace, | |
$text ) |
Returns the name of the namespace for the given title.
int | $namespace | |
string | $text |
InvalidArgumentException |
Implemented in MediaWiki\Title\MediaWikiTitleCodec.
MediaWiki\Title\TitleFormatter::getPrefixedDBkey | ( | $target | ) |
Return the title in prefixed database key form, with interwiki and namespace.
LinkTarget | PageReference | $target |
Implemented in MediaWiki\Title\MediaWikiTitleCodec.
MediaWiki\Title\TitleFormatter::getPrefixedText | ( | $title | ) |
Returns the title formatted for display, including the namespace name.
LinkTarget | PageReference | $title | The title to format |
Implemented in MediaWiki\Title\MediaWikiTitleCodec.
MediaWiki\Title\TitleFormatter::getText | ( | $title | ) |
Returns the title text formatted for display, without namespace or fragment.
LinkTarget | PageReference | $title | The title to format |
Implemented in MediaWiki\Title\MediaWikiTitleCodec.