49 $this->namespaceId =
null;
54 $this->pageName = str_replace(
' ',
'_',
$pageName );
62 return !is_null( $this->namespaceId );
71 if ( is_null( $this->namespaceId ) ) {
73 "Attempted to call getNamespaceId when the namespace ID is not known" );
91 if ( $this->namespaceName ) {
92 $result .= $this->namespaceName .
':';
109 $name .=
'{ns' . $this->namespaceId .
'}';
A simple, immutable structure to hold the title of a page on a foreign MediaWiki installation.
__toString()
Returns a string representation of the title, for logging.
__construct( $namespaceId, $namespaceName, $pageName)
Creates a new ForeignTitle object.
int null $namespaceId
Null if we don't know the namespace ID (e.g.
isNamespaceIdKnown()
Do we know the namespace ID of the page on the foreign wiki?