|
MediaWiki REL1_39
|
A parser that translates page titles on a foreign wiki into ForeignTitle objects, with no knowledge of the namespace setup on the foreign site. More...


Public Member Functions | |
| __construct (Language $contentLanguage) | |
| createForeignTitle ( $title, $ns=null) | |
| Create a ForeignTitle object. | |
A parser that translates page titles on a foreign wiki into ForeignTitle objects, with no knowledge of the namespace setup on the foreign site.
Definition at line 25 of file NaiveForeignTitleFactory.php.
| NaiveForeignTitleFactory::__construct | ( | Language | $contentLanguage | ) |
| Language | $contentLanguage |
Definition at line 33 of file NaiveForeignTitleFactory.php.
| NaiveForeignTitleFactory::createForeignTitle | ( | $title, | |
| $ns = null ) |
Create a ForeignTitle object.
Based on the page title and optionally the namespace ID, of a page on a foreign wiki. These values could be, for example, the <title> and <ns> attributes found in an XML dump.
Although exported XML dumps have contained a map of namespace IDs to names since MW 1.5, the importer used to completely ignore the <siteinfo> tag before MW 1.25. It is therefore possible that custom XML dumps (i.e. not generated by Special:Export) have been created without this metadata. As a result, this code falls back to using namespace data for the local wiki (similar to buggy pre-1.25 behaviour) if $ns is not supplied.
| string | $title | The page title |
| int | null | $ns | The namespace ID, or null if this data is not available |
Implements ForeignTitleFactory.
Definition at line 55 of file NaiveForeignTitleFactory.php.
References $title.