MediaWiki REL1_31
|
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. | |
Static Public Member Functions | |
static | fetch ( $prefix) |
Fetch an Interwiki object. | |
static | getAllPrefixes ( $local=null) |
Returns all interwiki prefix definitions. | |
static | invalidateCache ( $prefix) |
Purge the cache (local and persistent) for an interwiki prefix. | |
static | isValidInterwiki ( $prefix) |
Check whether an interwiki prefix exists. | |
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 wfGetLB( 'wikiid' )) | |
Value object for representing interwiki records.
Definition at line 27 of file Interwiki.php.
Interwiki::__construct | ( | $prefix = null, | |
$url = '', | |||
$api = '', | |||
$wikiId = '', | |||
$local = 0, | |||
$trans = 0 ) |
Definition at line 49 of file Interwiki.php.
|
static |
Fetch an Interwiki object.
string | $prefix | Interwiki prefix to use |
Definition at line 80 of file Interwiki.php.
|
static |
Returns all interwiki prefix definitions.
string | null | $local | If set, limits output to local/non-local interwikis |
Definition at line 103 of file Interwiki.php.
Referenced by InterwikiHooks\onInterwikiLoadPrefix(), and SpecialInterwiki\showList().
Interwiki::getAPI | ( | ) |
Get the API URL for this wiki.
Definition at line 130 of file Interwiki.php.
References $mAPI.
Interwiki::getDescription | ( | ) |
Get a description for this interwiki.
Definition at line 179 of file Interwiki.php.
References wfMessage().
Interwiki::getName | ( | ) |
Get the name for the interwiki site.
Definition at line 168 of file Interwiki.php.
References wfMessage().
Interwiki::getURL | ( | $title = null | ) |
Get the URL for a particular title (or with $1 if no title given)
string | $title | What text to put for the article name |
Definition at line 116 of file Interwiki.php.
References $mURL, and wfUrlencode().
Interwiki::getWikiID | ( | ) |
Get the DB name for this wiki.
Definition at line 139 of file Interwiki.php.
References $mWikiID.
|
static |
Purge the cache (local and persistent) for an interwiki prefix.
string | $prefix |
Definition at line 90 of file Interwiki.php.
Referenced by PopulateInterwiki\doPopulate(), SpecialInterwiki\doSubmit(), and InterwikiTest\testDatabaseStorage().
Interwiki::isLocal | ( | ) |
Is this a local link from a sister project, or is it something outside, like Google.
Definition at line 149 of file Interwiki.php.
References $mLocal.
Interwiki::isTranscludable | ( | ) |
Can pages from this wiki be transcluded? Still requires $wgEnableScaryTransclusion.
Definition at line 159 of file Interwiki.php.
References $mTrans.
|
static |
Check whether an interwiki prefix exists.
string | $prefix | Interwiki prefix to use |
Definition at line 68 of file Interwiki.php.
|
protected |
|
protected |
Whether the wiki is in this project.
Definition at line 44 of file Interwiki.php.
Referenced by isLocal().
|
protected |
The interwiki prefix, (e.g.
"Meatball", or the language prefix "de")
Definition at line 30 of file Interwiki.php.
|
protected |
Whether interwiki transclusions are allowed.
Definition at line 47 of file Interwiki.php.
Referenced by isTranscludable().
|
protected |
The URL of the wiki, with "$1" as a placeholder for an article name.
Definition at line 33 of file Interwiki.php.
Referenced by getURL().
|
protected |
The name of the database (for a connection to be established with wfGetLB( 'wikiid' ))
Definition at line 41 of file Interwiki.php.
Referenced by getWikiID().