MediaWiki  1.28.0
ForeignTitle Class Reference

A simple, immutable structure to hold the title of a page on a foreign MediaWiki installation. More...

Collaboration diagram for ForeignTitle:

Public Member Functions

 __construct ($namespaceId, $namespaceName, $pageName)
 Creates a new ForeignTitle object. More...
 
 __toString ()
 Returns a string representation of the title, for logging. More...
 
 getFullText ()
 
 getNamespaceId ()
 
 getNamespaceName ()
 
 getText ()
 
 isNamespaceIdKnown ()
 Do we know the namespace ID of the page on the foreign wiki? More...
 

Private Attributes

int null $namespaceId
 Null if we don't know the namespace ID (e.g. More...
 
string $namespaceName
 
string $pageName
 

Detailed Description

A simple, immutable structure to hold the title of a page on a foreign MediaWiki installation.

Definition at line 28 of file ForeignTitle.php.

Constructor & Destructor Documentation

ForeignTitle::__construct (   $namespaceId,
  $namespaceName,
  $pageName 
)

Creates a new ForeignTitle object.

Parameters
int | null$namespaceIdNull if the namespace ID is unknown (e.g. interwiki links)
string$namespaceName
string$pageName

Definition at line 47 of file ForeignTitle.php.

Member Function Documentation

ForeignTitle::__toString ( )

Returns a string representation of the title, for logging.

This is purely informative and must not be used programmatically. Use the appropriate ImportTitleFactory to generate the correct string representation for a given use.

Returns
string

Definition at line 106 of file ForeignTitle.php.

References $name, $pageName, and isNamespaceIdKnown().

ForeignTitle::getNamespaceId ( )
ForeignTitle::isNamespaceIdKnown ( )

Member Data Documentation

int null ForeignTitle::$namespaceId
private

Null if we don't know the namespace ID (e.g.

interwiki links)

Definition at line 33 of file ForeignTitle.php.

Referenced by getNamespaceId().

string ForeignTitle::$namespaceName
private

Definition at line 35 of file ForeignTitle.php.

Referenced by getNamespaceName().

string ForeignTitle::$pageName
private

Definition at line 37 of file ForeignTitle.php.

Referenced by __toString(), getFullText(), and getText().


The documentation for this class was generated from the following file: