|
MediaWiki
master
|
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. More... | |
| getDescription () | |
| Get a description for this interwiki. More... | |
| getName () | |
| Get the name for the interwiki site. More... | |
| getURL ($title=null) | |
| Get the URL for a particular title (or with $1 if no title given) More... | |
| getWikiID () | |
| Get the DB name for this wiki. More... | |
| isLocal () | |
| Is this a local link from a sister project, or is it something outside, like Google. More... | |
| isTranscludable () | |
| Can pages from this wiki be transcluded? Still requires $wgEnableScaryTransclusion. More... | |
Static Public Member Functions | |
| static | fetch ($prefix) |
| Fetch an Interwiki object. More... | |
| static | getAllPrefixes ($local=null) |
| Returns all interwiki prefixes. More... | |
| static | invalidateCache ($prefix) |
| Purge the cache (local and persistent) for an interwiki prefix. More... | |
| static | isValidInterwiki ($prefix) |
| Check whether an interwiki prefix exists. More... | |
Protected Attributes | |
| string | $mAPI |
| The URL of the file api.php. More... | |
| bool | $mLocal |
| Whether the wiki is in this project. More... | |
| string | $mPrefix |
| The interwiki prefix, (e.g. More... | |
| bool | $mTrans |
| Whether interwiki transclusions are allowed. More... | |
| string | $mURL |
| The URL of the wiki, with "$1" as a placeholder for an article name. More... | |
| string | $mWikiID |
| The name of the database (for a connection to be established with wfGetLB( 'wikiid' )) More... | |
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.
Referenced by ImportStreamSource\newFromInterwiki(), InterwikiTest\testArrayStorage(), InterwikiTest\testCDBStorage(), and InterwikiTest\testDatabaseStorage().
|
static |
Returns all interwiki prefixes.
| string | null | $local | If set, limits output to local/non-local interwikis |
Definition at line 103 of file Interwiki.php.
Referenced by ApiQuerySiteinfo\appendInterwikiMap(), NamespaceConflictChecker\getInterwikiList(), InterwikiTest\testArrayStorage(), InterwikiTest\testCDBStorage(), and InterwikiTest\testDatabaseStorage().
| 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, $title, 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 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.
Referenced by MediaWikiTitleCodec\splitTitleString(), InterwikiTest\testArrayStorage(), InterwikiTest\testCDBStorage(), and InterwikiTest\testDatabaseStorage().
|
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().