MediaWiki
REL1_22
|
Class representing a list of titles The execute() method checks them all for existence and adds them to a LinkCache object. More...
Public Member Functions | |
__construct ($arr=array()) | |
add ($ns, $dbkey) | |
addObj ($title) | |
addResultToCache ($cache, $res) | |
Add a ResultWrapper containing IDs and titles to a LinkCache object. | |
constructSet ($prefix, $db) | |
Construct a WHERE clause which will match all the given titles. | |
doGenderQuery () | |
Do (and cache) {{GENDER:...}} information for userpages in this LinkBatch. | |
doQuery () | |
Perform the existence test query, return a ResultWrapper with page_id fields. | |
execute () | |
Do the query and add the results to the LinkCache object. | |
getSize () | |
Returns the size of the batch. | |
isEmpty () | |
Returns true if no pages have been added, false otherwise. | |
setArray ($array) | |
Set the link list to a given 2-d array First key is the namespace, second is the DB key, value arbitrary. | |
setCaller ($caller) | |
Use ->setCaller( __METHOD__ ) to indicate which code is using this class. | |
Public Attributes | |
$data = array() | |
2-d array, first index namespace, second index dbkey, value arbitrary | |
Protected Member Functions | |
executeInto (&$cache) | |
Do the query and add the results to a given LinkCache object Return an array mapping PDBK to ID. | |
Protected Attributes | |
$caller | |
For debugging which method is using this class. |
Class representing a list of titles The execute() method checks them all for existence and adds them to a LinkCache object.
Definition at line 30 of file LinkBatch.php.
LinkBatch::__construct | ( | $ | arr = array() | ) |
Definition at line 41 of file LinkBatch.php.
LinkBatch::add | ( | $ | ns, |
$ | dbkey | ||
) |
$ns | int |
$dbkey | string |
Definition at line 74 of file LinkBatch.php.
Referenced by addObj().
LinkBatch::addObj | ( | $ | title | ) |
$title | Title |
Definition at line 61 of file LinkBatch.php.
References $title, add(), and wfDebug().
Referenced by __construct().
LinkBatch::addResultToCache | ( | $ | cache, |
$ | res | ||
) |
Add a ResultWrapper containing IDs and titles to a LinkCache object.
As normal, titles will go into the static Title cache field. This function *also* stores extra fields of the title used for link parsing to avoid extra DB queries.
$cache | LinkCache |
$res |
Definition at line 149 of file LinkBatch.php.
References $cache, $res, $title, array(), as, data, and Title\makeTitle().
Referenced by executeInto().
LinkBatch::constructSet | ( | $ | prefix, |
$ | db | ||
) |
Construct a WHERE clause which will match all the given titles.
string | $prefix | the appropriate table's field name prefix ('page', 'pl', etc) |
$db | DatabaseBase object to use |
Definition at line 230 of file LinkBatch.php.
References data.
Referenced by doQuery().
Do (and cache) {{GENDER:...}} information for userpages in this LinkBatch.
Definition at line 208 of file LinkBatch.php.
References $wgContLang, data, global, isEmpty(), and GenderCache\singleton().
Referenced by executeInto().
Perform the existence test query, return a ResultWrapper with page_id fields.
Definition at line 180 of file LinkBatch.php.
References $caller, $dbr, $res, array(), constructSet(), isEmpty(), wfGetDB(), wfProfileIn(), and wfProfileOut().
Referenced by executeInto().
Do the query and add the results to the LinkCache object.
Definition at line 118 of file LinkBatch.php.
References executeInto(), and LinkCache\singleton().
LinkBatch::executeInto | ( | &$ | cache | ) | [protected] |
Do the query and add the results to a given LinkCache object Return an array mapping PDBK to ID.
$cache | LinkCache |
Definition at line 130 of file LinkBatch.php.
References $cache, $res, addResultToCache(), doGenderQuery(), doQuery(), wfProfileIn(), and wfProfileOut().
Referenced by execute().
Returns the size of the batch.
Definition at line 109 of file LinkBatch.php.
References data.
Referenced by isEmpty().
Returns true if no pages have been added, false otherwise.
Definition at line 100 of file LinkBatch.php.
References getSize().
Referenced by doGenderQuery(), and doQuery().
LinkBatch::setArray | ( | $ | array | ) |
Set the link list to a given 2-d array First key is the namespace, second is the DB key, value arbitrary.
$array | array |
Definition at line 91 of file LinkBatch.php.
References data.
Referenced by TitleListDependency\getLinkBatch().
LinkBatch::setCaller | ( | $ | caller | ) |
Use ->setCaller( __METHOD__ ) to indicate which code is using this class.
Only used in debugging output.
$caller |
Definition at line 54 of file LinkBatch.php.
References $caller.
LinkBatch::$caller [protected] |
For debugging which method is using this class.
Definition at line 39 of file LinkBatch.php.
Referenced by doQuery(), and setCaller().
2-d array, first index namespace, second index dbkey, value arbitrary
Definition at line 34 of file LinkBatch.php.