MediaWiki REL1_34
|
A title parser service for MediaWiki. More...
Public Member Functions | |
makeTitleValueSafe ( $namespace, $text, $fragment='', $interwiki='') | |
Given a namespace and title, return a TitleValue if valid, or null if invalid. | |
parseTitle ( $text, $defaultNamespace=NS_MAIN) | |
Parses the given text and constructs a TitleValue. | |
A title parser 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 TitleParser.php.
TitleParser::makeTitleValueSafe | ( | $namespace, | |
$text, | |||
$fragment = '', | |||
$interwiki = '' ) |
Given a namespace and title, return a TitleValue if valid, or null if invalid.
int | $namespace | |
string | $text | |
string | $fragment | |
string | $interwiki |
Implemented in MediaWikiTitleCodec.
TitleParser::parseTitle | ( | $text, | |
$defaultNamespace = NS_MAIN ) |
Parses the given text and constructs a TitleValue.
string | $text | The text to parse |
int | $defaultNamespace | Namespace to assume per default (usually NS_MAIN) |
MalformedTitleException | If the text is not a valid representation of a page title. |
Implemented in MediaWikiTitleCodec.