|
MediaWiki
REL1_23
|
A codec for MediaWiki page titles. More...


Public Member Functions | |
| __construct (Language $language, GenderCache $genderCache, $localInterwikis=array()) | |
| formatTitle ($namespace, $text, $fragment= '') | |
| getFullText (TitleValue $title) | |
| getNamespaceName ($namespace, $text) | |
| getPrefixedText (TitleValue $title) | |
| getText (TitleValue $title) | |
| parseTitle ($text, $defaultNamespace) | |
| Parses the given text and constructs a TitleValue. | |
| splitTitleString ($text, $defaultNamespace=NS_MAIN) | |
| Normalizes and splits a title string. | |
Protected Attributes | |
| GenderCache | $genderCache |
| Language | $language |
| string[] | $localInterwikis |
A codec for MediaWiki page titles.
Definition at line 35 of file MediaWikiTitleCodec.php.
| MediaWikiTitleCodec::__construct | ( | Language $ | language, |
| GenderCache $ | genderCache, | ||
| $ | localInterwikis = array() |
||
| ) |
| Language | $language | the language object to use for localizing namespace names. |
| GenderCache | $genderCache | the gender cache for generating gendered namespace names |
| string[]|string | $localInterwikis |
Definition at line 54 of file MediaWikiTitleCodec.php.
| MediaWikiTitleCodec::formatTitle | ( | $ | namespace, |
| $ | text, | ||
| $ | fragment = '' |
||
| ) |
| int | bool | $namespace | The namespace ID (or false, if the namespace should be ignored) |
| string | $text | The page title. Should be valid. Only minimal normalization is applied. Underscores will be replaced. |
| string | $fragment | The fragment name (may be empty). |
| InvalidArgumentException | if the namespace is invalid |
Implements TitleFormatter.
Definition at line 98 of file MediaWikiTitleCodec.php.
| MediaWikiTitleCodec::getFullText | ( | TitleValue $ | title | ) |
| TitleValue | $title |
Implements TitleFormatter.
Definition at line 174 of file MediaWikiTitleCodec.php.
| MediaWikiTitleCodec::getNamespaceName | ( | $ | namespace, |
| $ | text | ||
| ) |
| int | $namespace | |
| string | $text |
| InvalidArgumentException | if the namespace is invalid |
Implements TitleFormatter.
Definition at line 69 of file MediaWikiTitleCodec.php.
| MediaWikiTitleCodec::getPrefixedText | ( | TitleValue $ | title | ) |
| TitleValue | $title |
Implements TitleFormatter.
Definition at line 163 of file MediaWikiTitleCodec.php.
| MediaWikiTitleCodec::getText | ( | TitleValue $ | title | ) |
| TitleValue | $title |
Implements TitleFormatter.
Definition at line 152 of file MediaWikiTitleCodec.php.
| MediaWikiTitleCodec::parseTitle | ( | $ | text, |
| $ | defaultNamespace | ||
| ) |
Parses the given text and constructs a TitleValue.
Normalization is applied according to the rules appropriate for the form specified by $form.
| string | $text | the text to parse |
| int | $defaultNamespace | namespace to assume per default (usually NS_MAIN) |
| MalformedTitleException |
Implements TitleParser.
Definition at line 126 of file MediaWikiTitleCodec.php.
| MediaWikiTitleCodec::splitTitleString | ( | $ | text, |
| $ | defaultNamespace = NS_MAIN |
||
| ) |
Normalizes and splits a title string.
This function removes illegal characters, splits off the interwiki and namespace prefixes, sets the other forms, and canonicalizes everything.
| string | $text | |
| int | $defaultNamespace |
| MalformedTitleException | If $text is not a valid title string. |
Definition at line 198 of file MediaWikiTitleCodec.php.
GenderCache MediaWikiTitleCodec::$genderCache [protected] |
Definition at line 43 of file MediaWikiTitleCodec.php.
Definition at line 39 of file MediaWikiTitleCodec.php.
string [] MediaWikiTitleCodec::$localInterwikis [protected] |
Definition at line 47 of file MediaWikiTitleCodec.php.