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 () | |
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. | |
getName () | |
Get the name for the interwiki site. | |
getDescription () | |
Get a description for this interwiki. | |
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 44 of file Interwiki.php.
References $wgContLang, $wgInterwikiCache, getInterwikiCached(), and load().
Referenced by Title::getFullURL(), Title::isLocal(), Title::isTrans(), and isValidInterwiki().
Interwiki::getDescription | ( | ) |
Get a description for this interwiki.
Definition at line 231 of file Interwiki.php.
References $msg, wfEmptyMsg(), and wfMsgForContent().
static Interwiki::getInterwikiCached | ( | $ | prefix | ) | [static, protected] |
Fetch interwiki prefix data from local cache in constant database.
$prefix | String: interwiki prefix |
Definition at line 78 of file Interwiki.php.
References $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 101 of file Interwiki.php.
References $wgInterwikiCache, $wgInterwikiFallbackSite, $wgInterwikiScopes, CdbReader::open(), wfDebug(), wfMemcKey(), and wfWikiID().
Referenced by getInterwikiCached().
Interwiki::getName | ( | ) |
Get the name for the interwiki site.
Definition at line 220 of file Interwiki.php.
References $msg, wfEmptyMsg(), and wfMsgForContent().
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 187 of file Interwiki.php.
Interwiki::isLocal | ( | ) |
Is this a local link from a sister project, or is it something outside, like Google.
Definition at line 201 of file Interwiki.php.
Interwiki::isTranscludable | ( | ) |
Can pages from this wiki be transcluded? Still requires $wgEnableScaryTransclusion.
Definition at line 211 of file Interwiki.php.
static Interwiki::isValidInterwiki | ( | $ | prefix | ) | [static] |
Check whether an interwiki prefix exists.
$prefix | String: interwiki prefix to use |
Definition at line 33 of file Interwiki.php.
References $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 138 of file Interwiki.php.
References $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)
$mc | Associative array: row from the interwiki table |
Definition at line 170 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.