|
MediaWiki
REL1_23
|
The interwiki class All information is loaded on creation when called by Interwiki::fetch( $prefix ). 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 prefixes. | |
| static | isValidInterwiki ($prefix) |
| Check whether an interwiki prefix exists. | |
| static | selectFields () |
| Return the list of interwiki fields that should be selected to create a new Interwiki object. | |
Public Attributes | |
| const | CACHE_LIMIT = 100 |
Static Protected Member Functions | |
| static | getAllPrefixesCached ($local) |
| Fetch all interwiki prefixes from interwiki cache. | |
| static | getAllPrefixesDB ($local) |
| Fetch all interwiki prefixes from DB. | |
| static | getInterwikiCached ($prefix) |
| Fetch interwiki prefix data from local cache in constant database. | |
| static | getInterwikiCacheEntry ($prefix) |
| Get entry from interwiki cache. | |
| static | load ($prefix) |
| Load the interwiki, trying first memcached then the DB. | |
| static | loadFromArray ($mc) |
| Fill in member variables from an array (e.g. | |
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' )) | |
Static Protected Attributes | |
| static | $smCache = array() |
The interwiki class All information is loaded on creation when called by Interwiki::fetch( $prefix ).
All work is done on slave, because this should *never* change (except during schema updates etc, which aren't wiki-related)
Definition at line 29 of file Interwiki.php.
| Interwiki::__construct | ( | $ | prefix = null, |
| $ | url = '', |
||
| $ | api = '', |
||
| $ | wikiId = '', |
||
| $ | local = 0, |
||
| $ | trans = 0 |
||
| ) |
Definition at line 48 of file Interwiki.php.
| static Interwiki::fetch | ( | $ | prefix | ) | [static] |
Fetch an Interwiki object.
| string | $prefix | Interwiki prefix to use |
Definition at line 77 of file Interwiki.php.
Referenced by Title\getLocalURL(), Title\getTransWikiID(), Title\isLocal(), and Title\isTrans().
| static Interwiki::getAllPrefixes | ( | $ | local = null | ) | [static] |
Returns all interwiki prefixes.
| string | null | $local | If set, limits output to local/non-local interwikis |
Definition at line 367 of file Interwiki.php.
Referenced by ApiQuerySiteinfo\appendInterwikiMap().
| static Interwiki::getAllPrefixesCached | ( | $ | local | ) | [static, protected] |
Fetch all interwiki prefixes from interwiki cache.
| null | string | $local | If not null, limits output to local/non-local interwikis |
Definition at line 266 of file Interwiki.php.
| static Interwiki::getAllPrefixesDB | ( | $ | local | ) | [static, protected] |
Fetch all interwiki prefixes from DB.
| string | null | $local | If not null, limits output to local/non-local interwikis |
Definition at line 334 of file Interwiki.php.
Get a description for this interwiki.
Definition at line 449 of file Interwiki.php.
References wfMessage().
| static Interwiki::getInterwikiCached | ( | $ | prefix | ) | [static, protected] |
Fetch interwiki prefix data from local cache in constant database.
| string | $prefix | Interwiki prefix |
Definition at line 117 of file Interwiki.php.
| static Interwiki::getInterwikiCacheEntry | ( | $ | prefix | ) | [static, protected] |
Get entry from interwiki cache.
| string | $prefix | Database key |
Definition at line 141 of file Interwiki.php.
Get the name for the interwiki site.
Definition at line 438 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 386 of file Interwiki.php.
Get the DB name for this wiki.
Definition at line 409 of file Interwiki.php.
Is this a local link from a sister project, or is it something outside, like Google.
Definition at line 419 of file Interwiki.php.
Can pages from this wiki be transcluded? Still requires $wgEnableScaryTransclusion.
Definition at line 429 of file Interwiki.php.
| static Interwiki::isValidInterwiki | ( | $ | prefix | ) | [static] |
Check whether an interwiki prefix exists.
| string | $prefix | Interwiki prefix to use |
Definition at line 65 of file Interwiki.php.
| static Interwiki::load | ( | $ | prefix | ) | [static, protected] |
Load the interwiki, trying first memcached then the DB.
| string | $prefix | The interwiki prefix |
Definition at line 185 of file Interwiki.php.
| static Interwiki::loadFromArray | ( | $ | mc | ) | [static, protected] |
Fill in member variables from an array (e.g.
memcached result, Database::fetchRow, etc)
| array | $mc | Associative array: row from the interwiki table |
Definition at line 244 of file Interwiki.php.
| static Interwiki::selectFields | ( | ) | [static] |
Return the list of interwiki fields that should be selected to create a new Interwiki object.
Definition at line 460 of file Interwiki.php.
References array().
string Interwiki::$mAPI [protected] |
The URL of the file api.php *.
Definition at line 38 of file Interwiki.php.
bool Interwiki::$mLocal [protected] |
whether the wiki is in this project *
Definition at line 44 of file Interwiki.php.
string Interwiki::$mPrefix [protected] |
The interwiki prefix, (e.g.
"Meatball", or the language prefix "de") *
Definition at line 34 of file Interwiki.php.
bool Interwiki::$mTrans [protected] |
Whether interwiki transclusions are allowed *.
Definition at line 46 of file Interwiki.php.
string Interwiki::$mURL [protected] |
The URL of the wiki, with "$1" as a placeholder for an article name.
*
Definition at line 36 of file Interwiki.php.
string Interwiki::$mWikiID [protected] |
The name of the database (for a connection to be established with wfGetLB( 'wikiid' ))
Definition at line 42 of file Interwiki.php.
Interwiki::$smCache = array() [static, protected] |
Definition at line 31 of file Interwiki.php.
| const Interwiki::CACHE_LIMIT = 100 |
Definition at line 32 of file Interwiki.php.