Public Member Functions | |
__construct ($prefix=null, $url= '', $local=0, $trans=0) | |
getURL ($title=null) | |
Get the URL for a particular title (or with $1 if no title given). | |
isLocal () | |
isTranscludable () | |
Static Public Member Functions | |
static | isValidInterwiki ($prefix) |
Check whether an interwiki prefix exists. | |
static | fetch ($prefix) |
Fetch an Interwiki object. | |
Public Attributes | |
const | CACHE_LIMIT = 100 |
Static Protected Member Functions | |
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 | |
$mPrefix | |
$mURL | |
$mLocal | |
$mTrans | |
Static Protected Attributes | |
static | $smCache = array() |
All work is done on slave, because this should *never* change (except during schema updates etc, which arent wiki-related)
Definition at line 12 of file Interwiki.php.
Interwiki::__construct | ( | $ | prefix = null , |
|
$ | url = '' , |
|||
$ | local = 0 , |
|||
$ | trans = 0 | |||
) |
static Interwiki::fetch | ( | $ | prefix | ) | [static] |
Fetch an Interwiki object.
$prefix | string Interwiki prefix to use |
Definition at line 45 of file Interwiki.php.
References $prefix, $wgContLang, $wgInterwikiCache, getInterwikiCached(), and load().
Referenced by Title::getFullURL(), Title::getInterwikiLink(), Title::isLocal(), Title::isTrans(), and isValidInterwiki().
static Interwiki::getInterwikiCached | ( | $ | prefix | ) | [static, protected] |
Fetch interwiki prefix data from local cache in constant database.
$prefix | String : : Interwiki prefix |
Definition at line 79 of file Interwiki.php.
References $prefix, $s, $url, and getInterwikiCacheEntry().
Referenced by fetch().
static Interwiki::getInterwikiCacheEntry | ( | $ | prefix | ) | [static, protected] |
Get entry from interwiki cache.
$prefix | String : : Database key |
Definition at line 102 of file Interwiki.php.
References $db, $prefix, $wgInterwikiCache, $wgInterwikiFallbackSite, $wgInterwikiScopes, wfDebug(), wfMemcKey(), and wfWikiID().
Referenced by getInterwikiCached().
Interwiki::getURL | ( | $ | title = null |
) |
Get the URL for a particular title (or with $1 if no title given).
$title | string What text to put for the article name |
Definition at line 191 of file Interwiki.php.
Interwiki::isLocal | ( | ) |
Definition at line 199 of file Interwiki.php.
Interwiki::isTranscludable | ( | ) |
Definition at line 203 of file Interwiki.php.
static Interwiki::isValidInterwiki | ( | $ | prefix | ) | [static] |
Check whether an interwiki prefix exists.
$prefix | string Interwiki prefix to use |
Definition at line 34 of file Interwiki.php.
References $prefix, $result, and fetch().
Referenced by Title::secureAndSplit().
static Interwiki::load | ( | $ | prefix | ) | [static, protected] |
Load the interwiki, trying first memcached then the DB.
$prefix | The interwiki prefix |
Definition at line 141 of file Interwiki.php.
References $db, $key, $prefix, $row, $wgInterwikiExpiry, $wgMemc, loadFromArray(), wfGetDB(), and wfMemcKey().
Referenced by fetch().
static Interwiki::loadFromArray | ( | $ | mc | ) | [static, protected] |
Fill in member variables from an array (e.g.
memcached result, Database::fetchRow, etc)
$res | ResultWrapper Row from the interwiki table |
Definition at line 174 of file Interwiki.php.
Referenced by load().
Interwiki::$mLocal [protected] |
Definition at line 18 of file Interwiki.php.
Interwiki::$mPrefix [protected] |
Definition at line 18 of file Interwiki.php.
Interwiki::$mTrans [protected] |
Definition at line 18 of file Interwiki.php.
Interwiki::$mURL [protected] |
Definition at line 18 of file Interwiki.php.
Interwiki::$smCache = array() [static, protected] |
Definition at line 15 of file Interwiki.php.
const Interwiki::CACHE_LIMIT = 100 |
Definition at line 16 of file Interwiki.php.