Public Member Functions | |
__construct ($arr=array()) | |
addObj ($title) | |
add ($ns, $dbkey) | |
setArray ($array) | |
Set the link list to a given 2-d array First key is the namespace, second is the DB key, value arbitrary. | |
isEmpty () | |
Returns true if no pages have been added, false otherwise. | |
getSize () | |
Returns the size of the batch. | |
execute () | |
Do the query and add the results to the LinkCache object Return an array mapping PDBK to ID. | |
addResultToCache ($cache, $res) | |
Add a ResultWrapper containing IDs and titles to a LinkCache object. | |
doQuery () | |
Perform the existence test query, return a ResultWrapper with page_id fields. | |
constructSet ($prefix, &$db) | |
Construct a WHERE clause which will match all the given titles. | |
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. |
Definition at line 9 of file LinkBatch.php.
LinkBatch::__construct | ( | $ | arr = array() |
) |
LinkBatch::add | ( | $ | ns, | |
$ | dbkey | |||
) |
LinkBatch::addObj | ( | $ | title | ) |
Definition at line 21 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.
Definition at line 89 of file LinkBatch.php.
References $ns, $res, $row, $title, and Title::makeTitle().
Referenced by executeInto().
LinkBatch::constructSet | ( | $ | prefix, | |
&$ | db | |||
) |
LinkBatch::doQuery | ( | ) |
Perform the existence test query, return a ResultWrapper with page_id fields.
Definition at line 119 of file LinkBatch.php.
References $dbr, $page, $res, $sql, constructSet(), isEmpty(), wfGetDB(), wfProfileIn(), and wfProfileOut().
Referenced by executeInto().
LinkBatch::execute | ( | ) |
Do the query and add the results to the LinkCache object Return an array mapping PDBK to ID.
Definition at line 66 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.
Definition at line 75 of file LinkBatch.php.
References $res, addResultToCache(), doQuery(), wfProfileIn(), and wfProfileOut().
Referenced by execute().
LinkBatch::getSize | ( | ) |
Returns the size of the batch.
Definition at line 58 of file LinkBatch.php.
Referenced by isEmpty().
LinkBatch::isEmpty | ( | ) |
Returns true if no pages have been added, false otherwise.
Definition at line 51 of file LinkBatch.php.
References getSize().
Referenced by 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.
Definition at line 44 of file LinkBatch.php.
LinkBatch::$data = array() |
2-d array, first index namespace, second index dbkey, value arbitrary
Definition at line 13 of file LinkBatch.php.