MediaWiki
REL1_19
|
Cache for article titles (prefixed DB keys) and ids linked from one source. More...
Public Member Functions | |
addBadLinkObj ($title) | |
addGoodLinkObj ($id, $title, $len=-1, $redir=null, $revision=false) | |
Add a link for the title to the link cache. | |
addGoodLinkObjFromRow ($title, $row) | |
Same as above with better interface. | |
addLink ($title) | |
Add a title to the link cache, return the page_id or zero if non-existent. | |
addLinkObj ($nt) | |
Add a title to the link cache, return the page_id or zero if non-existent. | |
clear () | |
Clears cache. | |
clearBadLink ($title) | |
clearLink ($title) | |
forUpdate ($update=null) | |
General accessor to get/set whether SELECT FOR UPDATE should be used. | |
getBadLinks () | |
getGoodLinkFieldObj ($title, $field) | |
Get a field of a title object from cache. | |
getGoodLinkID ($title) | |
getGoodLinks () | |
isBadLink ($title) | |
Static Public Member Functions | |
static & | singleton () |
Get an instance of this class. | |
Private Attributes | |
$mBadLinks = array() | |
$mClassVer = 4 | |
$mForUpdate = false | |
$mGoodLinkFields = array() | |
$mGoodLinks = array() |
Cache for article titles (prefixed DB keys) and ids linked from one source.
Definition at line 7 of file LinkCache.php.
LinkCache::addBadLinkObj | ( | $ | title | ) |
$title | Title |
Definition at line 113 of file LinkCache.php.
References $title, and isBadLink().
Referenced by addLinkObj().
LinkCache::addGoodLinkObj | ( | $ | id, |
$ | title, | ||
$ | len = -1 , |
||
$ | redir = null , |
||
$ | revision = false |
||
) |
Add a link for the title to the link cache.
$id | Integer: page's ID |
$title | Title object |
$len | Integer: text's length |
$redir | Integer: whether the page is a redirect |
$revision | Integer: latest revision's ID |
Definition at line 84 of file LinkCache.php.
References $title.
LinkCache::addGoodLinkObjFromRow | ( | $ | title, |
$ | row | ||
) |
Same as above with better interface.
$title | Title |
$row | object which has the fields page_id, page_is_redirect, page_latest |
Definition at line 100 of file LinkCache.php.
References $title.
Referenced by addLinkObj().
LinkCache::addLink | ( | $ | title | ) |
Add a title to the link cache, return the page_id or zero if non-existent.
$title | String: title to add |
Definition at line 143 of file LinkCache.php.
References $title, addLinkObj(), and Title\newFromDBkey().
LinkCache::addLinkObj | ( | $ | nt | ) |
Add a title to the link cache, return the page_id or zero if non-existent.
$nt | Title object to add |
Definition at line 158 of file LinkCache.php.
References $options, $wgAntiLockFlags, addBadLinkObj(), addGoodLinkObjFromRow(), getGoodLinkID(), isBadLink(), wfGetDB(), wfProfileIn(), and wfProfileOut().
Referenced by addLink().
LinkCache::clear | ( | ) |
Clears cache.
Definition at line 211 of file LinkCache.php.
LinkCache::clearBadLink | ( | $ | title | ) |
Definition at line 120 of file LinkCache.php.
References $title.
LinkCache::clearLink | ( | $ | title | ) |
LinkCache::forUpdate | ( | $ | update = null | ) |
General accessor to get/set whether SELECT FOR UPDATE should be used.
Definition at line 35 of file LinkCache.php.
References wfSetVar().
Definition at line 135 of file LinkCache.php.
LinkCache::getGoodLinkFieldObj | ( | $ | title, |
$ | field | ||
) |
Get a field of a title object from cache.
If this link is not good, it will return NULL.
$title | Title |
$field | String: ('length','redirect','revision') |
Definition at line 58 of file LinkCache.php.
References $title.
LinkCache::getGoodLinkID | ( | $ | title | ) |
$title |
Definition at line 43 of file LinkCache.php.
References $title.
Referenced by addLinkObj().
Definition at line 134 of file LinkCache.php.
LinkCache::isBadLink | ( | $ | title | ) |
$title |
Definition at line 71 of file LinkCache.php.
References $title.
Referenced by addBadLinkObj(), and addLinkObj().
static& LinkCache::singleton | ( | ) | [static] |
Get an instance of this class.
Definition at line 22 of file LinkCache.php.
Referenced by OutputPage\addCategoryLinks(), NewParserTest\addDBData(), LinkHolderArray\doVariants(), LinkBatch\execute(), RefreshLinks\fixLinksFromArticle(), Title\getArticleID(), Title\getLatestRevID(), Title\getLength(), Title\getLinksFrom(), Title\getLinksTo(), WikiRevision\importOldRevision(), SearchEngineTest\insertPage(), Title\isRedirect(), WikiPage\loadPageData(), TitleCleanup\moveInconsistentPage(), LinkHolderArray\replaceInternal(), Title\resetArticleID(), RefreshLinksJob\run(), RefreshLinksJob2\run(), Parser\statelessFetchTemplate(), NewParserTest\teardownGlobals(), ParserTest\teardownGlobals(), and WikiPage\updateRevisionOn().
LinkCache::$mBadLinks = array() [private] |
Definition at line 14 of file LinkCache.php.
LinkCache::$mClassVer = 4 [private] |
Definition at line 10 of file LinkCache.php.
LinkCache::$mForUpdate = false [private] |
Definition at line 15 of file LinkCache.php.
LinkCache::$mGoodLinkFields = array() [private] |
Definition at line 13 of file LinkCache.php.
LinkCache::$mGoodLinks = array() [private] |
Definition at line 12 of file LinkCache.php.