A parser that translates page titles on a foreign wiki into ForeignTitle objects, using information about the namespace setup on the foreign site.
More...
A parser that translates page titles on a foreign wiki into ForeignTitle objects, using information about the namespace setup on the foreign site.
Definition at line 26 of file NamespaceAwareForeignTitleFactory.php.
NamespaceAwareForeignTitleFactory::__construct |
( |
|
$foreignNamespaces | ) |
|
- Parameters
-
array | null | $foreignNamespaces | An array 'id' => 'name' which contains the complete namespace setup of the foreign wiki. Such data could be obtained from siteinfo/namespaces in an XML dump file, or by an action API query such as api.php?action=query&meta=siteinfo&siprop=namespaces. If this data is unavailable, use NaiveForeignTitleFactory instead. |
Definition at line 52 of file NamespaceAwareForeignTitleFactory.php.
References $foreignNamespaces, $name, and as.
NamespaceAwareForeignTitleFactory::createForeignTitle |
( |
|
$title, |
|
|
|
$ns = null |
|
) |
| |
Creates 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.
- Parameters
-
string | $title | The page title |
int | null | $ns | The namespace ID, or null if this data is not available |
- Returns
- ForeignTitle
Implements ForeignTitleFactory.
Definition at line 72 of file NamespaceAwareForeignTitleFactory.php.
References $title.
NamespaceAwareForeignTitleFactory::normalizeNamespaceName |
( |
|
$name | ) |
|
|
private |
NamespaceAwareForeignTitleFactory::parseTitleNoNs |
( |
|
$title | ) |
|
|
protected |
NamespaceAwareForeignTitleFactory::parseTitleWithNs |
( |
|
$title, |
|
|
|
$ns |
|
) |
| |
|
protected |
array NamespaceAwareForeignTitleFactory::$foreignNamespaces |
|
protected |
array NamespaceAwareForeignTitleFactory::$foreignNamespacesFlipped |
|
private |
The documentation for this class was generated from the following file: