MediaWiki
1.30.0
|
A title parser service for MediaWiki. More...
Public Member Functions | |
parseTitle ( $text, $defaultNamespace) | |
Parses the given text and constructs a TitleValue. More... | |
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 34 of file TitleParser.php.
TitleParser::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 | If the text is not a valid representation of a page title. |
Implemented in MediaWikiTitleCodec.