[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Batch query to determine page existence. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 244 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 1 time |
Includes or requires: | 0 files |
LinkBatch:: (13 methods):
__construct()
setCaller()
addObj()
add()
setArray()
isEmpty()
getSize()
execute()
executeInto()
addResultToCache()
doQuery()
doGenderQuery()
constructSet()
__construct( $arr = array() X-Ref |
For debugging which method is using this class. |
setCaller( $caller ) X-Ref |
Use ->setCaller( __METHOD__ ) to indicate which code is using this class. Only used in debugging output. param: string $caller |
addObj( $title ) X-Ref |
param: Title $title |
add( $ns, $dbkey ) X-Ref |
param: int $ns param: string $dbkey |
setArray( $array ) X-Ref |
Set the link list to a given 2-d array First key is the namespace, second is the DB key, value arbitrary param: array $array |
isEmpty() X-Ref |
Returns true if no pages have been added, false otherwise. return: bool |
getSize() X-Ref |
Returns the size of the batch. return: int |
execute() X-Ref |
Do the query and add the results to the LinkCache object return: array Mapping PDBK to ID |
executeInto( &$cache ) X-Ref |
Do the query and add the results to a given LinkCache object Return an array mapping PDBK to ID param: LinkCache $cache return: array Remaining IDs |
addResultToCache( $cache, $res ) X-Ref |
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. param: LinkCache $cache param: ResultWrapper $res return: array Array of remaining titles |
doQuery() X-Ref |
Perform the existence test query, return a ResultWrapper with page_id fields return: bool|ResultWrapper |
doGenderQuery() X-Ref |
Do (and cache) {{GENDER:...}} information for userpages in this LinkBatch return: bool Whether the query was successful |
constructSet( $prefix, $db ) X-Ref |
Construct a WHERE clause which will match all the given titles. param: string $prefix The appropriate table's field name prefix ('page', 'pl', etc) param: DatabaseBase $db DatabaseBase object to use return: string|bool String with SQL where clause fragment, or false if no items. |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |