MediaWiki REL1_39
Interwiki Class Reference

Value object for representing interwiki records. More...

Public Member Functions

 __construct ( $prefix=null, $url='', $api='', $wikiId='', $local=0, $trans=0)
 
 getAPI ()
 Get the API URL for this wiki.
 
 getDescription ()
 Get a description for this interwiki.
 
 getName ()
 Get the name for the interwiki site.
 
 getURL ( $title=null)
 Get the URL for a particular title (or with $1 if no title given)
 
 getWikiID ()
 Get the DB name for this wiki.
 
 isLocal ()
 Is this a local link from a sister project, or is it something outside, like Google.
 
 isTranscludable ()
 Can pages from this wiki be transcluded? Still requires $wgEnableScaryTransclusion.
 

Protected Attributes

string $mAPI
 The URL of the file api.php.
 
bool $mLocal
 Whether the wiki is in this project.
 
string $mPrefix
 The interwiki prefix, (e.g.
 
bool $mTrans
 Whether interwiki transclusions are allowed.
 
string $mURL
 The URL of the wiki, with "$1" as a placeholder for an article name.
 
string $mWikiID
 The name of the database (for a connection to be established with LBFactory::getMainLB( 'domainId' ))
 

Detailed Description

Value object for representing interwiki records.

Definition at line 26 of file Interwiki.php.

Constructor & Destructor Documentation

◆ __construct()

Interwiki::__construct ( $prefix = null,
$url = '',
$api = '',
$wikiId = '',
$local = 0,
$trans = 0 )

Definition at line 48 of file Interwiki.php.

Member Function Documentation

◆ getAPI()

Interwiki::getAPI ( )

Get the API URL for this wiki.

Returns
string The URL

Definition at line 82 of file Interwiki.php.

References $mAPI.

◆ getDescription()

Interwiki::getDescription ( )

Get a description for this interwiki.

Returns
string

Definition at line 131 of file Interwiki.php.

References wfMessage().

◆ getName()

Interwiki::getName ( )

Get the name for the interwiki site.

Returns
string

Definition at line 120 of file Interwiki.php.

References wfMessage().

◆ getURL()

Interwiki::getURL ( $title = null)

Get the URL for a particular title (or with $1 if no title given)

Parameters
string | null$titleWhat text to put for the article name
Returns
string The URL
Note
Prior to 1.19 The getURL with an argument was broken. If you if you use this arg in an extension that supports MW earlier than 1.19 please wfUrlencode and substitute $1 on your own.

Definition at line 68 of file Interwiki.php.

References $mURL, $title, and wfUrlencode().

◆ getWikiID()

Interwiki::getWikiID ( )

Get the DB name for this wiki.

Returns
string The DB name

Definition at line 91 of file Interwiki.php.

References $mWikiID.

◆ isLocal()

Interwiki::isLocal ( )

Is this a local link from a sister project, or is it something outside, like Google.

Returns
bool

Definition at line 101 of file Interwiki.php.

References $mLocal.

◆ isTranscludable()

Interwiki::isTranscludable ( )

Can pages from this wiki be transcluded? Still requires $wgEnableScaryTransclusion.

Returns
bool

Definition at line 111 of file Interwiki.php.

References $mTrans.

Member Data Documentation

◆ $mAPI

string Interwiki::$mAPI
protected

The URL of the file api.php.

Definition at line 35 of file Interwiki.php.

Referenced by getAPI().

◆ $mLocal

bool Interwiki::$mLocal
protected

Whether the wiki is in this project.

Definition at line 43 of file Interwiki.php.

Referenced by isLocal().

◆ $mPrefix

string Interwiki::$mPrefix
protected

The interwiki prefix, (e.g.

"Meatball", or the language prefix "de")

Definition at line 29 of file Interwiki.php.

◆ $mTrans

bool Interwiki::$mTrans
protected

Whether interwiki transclusions are allowed.

Definition at line 46 of file Interwiki.php.

Referenced by isTranscludable().

◆ $mURL

string Interwiki::$mURL
protected

The URL of the wiki, with "$1" as a placeholder for an article name.

Definition at line 32 of file Interwiki.php.

Referenced by getURL().

◆ $mWikiID

string Interwiki::$mWikiID
protected

The name of the database (for a connection to be established with LBFactory::getMainLB( 'domainId' ))

Definition at line 40 of file Interwiki.php.

Referenced by getWikiID().


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