MediaWiki
1.23.5
|
Public Member Functions | |
characterData ( $parser, $data) | |
checkIfTimeExceeded () | |
clearOpenElement ( $style) | |
dump ( $history, $text=WikiExporter::TEXT) | |
endElement ( $parser, $name) | |
finalOptionCheck () | |
getText ( $id) | |
Tries to get the revision text for a revision id. More... | |
initProgress ( $history=WikiExporter::FULL) | |
Initialise starting time and maximum revision count. More... | |
openSpawn () | |
processFileOpt ( $val, $param) | |
processOption ( $opt, $val, $param) | |
readDump ( $input) | |
rotateDb () | |
Drop the database connection $this->db and try to get a new one. More... | |
setTimeExceeded () | |
showReport () | |
Overridden to include prefetch ratio if enabled. More... | |
startElement ( $parser, $name, $attribs) | |
Public Member Functions inherited from BackupDumper | |
__construct ( $args) | |
__destruct () | |
backupDb () | |
backupServer () | |
fatalError ( $msg) | |
loadPlugin ( $class, $file) | |
Load a plugin and register it. More... | |
processArgs ( $args) | |
progress ( $string) | |
registerFilter ( $name, $class) | |
registerOutput ( $name, $class) | |
report ( $final=false) | |
reportPage () | |
revCount () | |
setDb (DatabaseBase $db=null) | |
Force the dump to use the provided database connection for database operations, wherever possible. More... | |
Protected Attributes | |
DatabaseBase | $db |
Protected Attributes inherited from BackupDumper | |
DatabaseBase null | $forcedDb = null |
The dependency-injected database to use. More... | |
LoadBalancer | $lb |
Private Member Functions | |
closeSpawn () | |
getTextDb ( $id) | |
May throw a database error if, say, the server dies during query. More... | |
getTextSpawned ( $id) | |
getTextSpawnedOnce ( $id) | |
Definition at line 32 of file backupTextPass.inc.
TextPassDumper::characterData | ( | $parser, | |
$data | |||
) |
Definition at line 797 of file backupTextPass.inc.
References clearOpenElement().
Referenced by startElement().
TextPassDumper::checkIfTimeExceeded | ( | ) |
Definition at line 293 of file backupTextPass.inc.
Referenced by readDump().
TextPassDumper::clearOpenElement | ( | $style | ) |
Definition at line 817 of file backupTextPass.inc.
References Xml\element().
Referenced by characterData(), endElement(), and startElement().
|
private |
Definition at line 627 of file backupTextPass.inc.
References wfRestoreWarnings(), and wfSuppressWarnings().
TextPassDumper::dump | ( | $history, | |
$text = WikiExporter::TEXT |
|||
) |
Reimplemented from BackupDumper.
Definition at line 133 of file backupTextPass.inc.
References $e, $input, closeSpawn(), finalOptionCheck(), initProgress(), BackupDumper\progress(), readDump(), BackupDumper\report(), and rotateDb().
TextPassDumper::endElement | ( | $parser, | |
$name | |||
) |
Definition at line 738 of file backupTextPass.inc.
References BackupDumper\$lastTime, $name, array(), and clearOpenElement().
TextPassDumper::finalOptionCheck | ( | ) |
TextPassDumper::getText | ( | $id | ) |
Tries to get the revision text for a revision id.
Upon errors, retries (Up to $this->maxFailures tries each call). If still no good revision get could be found even after this retrying, "" is returned. If no good revision text could be returned for $this->maxConsecutiveFailedTextRetrievals consecutive calls to getText, MWException is thrown.
$id | string The revision id to get the text for |
MWException |
Definition at line 408 of file backupTextPass.inc.
References $e, array(), closeSpawn(), CONTENT_MODEL_WIKITEXT, getTextDb(), getTextSpawned(), global, openSpawn(), BackupDumper\progress(), and rotateDb().
Referenced by startElement().
|
private |
May throw a database error if, say, the server dies during query.
$id |
MWException |
Definition at line 557 of file backupTextPass.inc.
References $wgContLang, array(), Revision\getRevisionText(), and global.
Referenced by getText().
|
private |
Definition at line 575 of file backupTextPass.inc.
References getTextSpawnedOnce(), openSpawn(), wfRestoreWarnings(), and wfSuppressWarnings().
Referenced by getText().
|
private |
Definition at line 648 of file backupTextPass.inc.
References $ok, $wgContLang, global, and BackupDumper\progress().
Referenced by getTextSpawned().
TextPassDumper::initProgress | ( | $history = WikiExporter::FULL | ) |
Initialise starting time and maximum revision count.
We'll make ETA calculations based an progress, assuming relatively constant per-revision rate.
$history | Integer: WikiExporter::CURRENT or WikiExporter::FULL |
Reimplemented from BackupDumper.
Definition at line 128 of file backupTextPass.inc.
Referenced by dump().
TextPassDumper::openSpawn | ( | ) |
Definition at line 586 of file backupTextPass.inc.
References $IP, array(), global, list, php, BackupDumper\progress(), and wfWikiID().
Referenced by getText(), and getTextSpawned().
TextPassDumper::processFileOpt | ( | $val, | |
$param | |||
) |
TextPassDumper::processOption | ( | $opt, | |
$val, | |||
$param | |||
) |
Reimplemented from BackupDumper.
Definition at line 174 of file backupTextPass.inc.
References $IP, WikiExporter\CURRENT, WikiExporter\FULL, global, php, and processFileOpt().
TextPassDumper::readDump | ( | $input | ) |
MWException | Failure to parse XML input |
Definition at line 324 of file backupTextPass.inc.
References $input, $parser, array(), checkIfTimeExceeded(), setTimeExceeded(), wfDebug(), and wfMessage().
Referenced by dump().
TextPassDumper::rotateDb | ( | ) |
Drop the database connection $this->db and try to get a new one.
This function tries to get a /different/ connection if this is possible. Hence, (if this is possible) it switches to a different failover upon each call.
This function resets $this->lb and closes all connections on it.
MWException |
Definition at line 91 of file backupTextPass.inc.
References $e, BackupDumper\$forcedDb, DB_SLAVE, and wfGetLBFactory().
TextPassDumper::setTimeExceeded | ( | ) |
Definition at line 289 of file backupTextPass.inc.
Referenced by readDump().
TextPassDumper::showReport | ( | ) |
Overridden to include prefetch ratio if enabled.
Reimplemented from BackupDumper.
Definition at line 235 of file backupTextPass.inc.
References $fetchCount, $fetchCountLast, BackupDumper\$lastTime, BackupDumper\$pageCountLast, $prefetchCount, BackupDumper\$revCount, BackupDumper\$revCountLast, ID, BackupDumper\progress(), BackupDumper\revCount(), TS_DB, wfTimestamp(), and wfWikiID().
TextPassDumper::startElement | ( | $parser, | |
$name, | |||
$attribs | |||
) |
Definition at line 708 of file backupTextPass.inc.
References $attribs, $name, $parser, array(), characterData(), clearOpenElement(), and getText().
TextPassDumper::$checkpointFiles = array() |
Definition at line 74 of file backupTextPass.inc.
TextPassDumper::$checkpointJustWritten = false |
Definition at line 73 of file backupTextPass.inc.
|
protected |
Definition at line 78 of file backupTextPass.inc.
TextPassDumper::$failureTimeout = 5 |
Definition at line 43 of file backupTextPass.inc.
TextPassDumper::$fetchCount = 0 |
Definition at line 36 of file backupTextPass.inc.
Referenced by showReport().
TextPassDumper::$fetchCountLast = 0 |
Definition at line 39 of file backupTextPass.inc.
Referenced by showReport().
TextPassDumper::$firstPageWritten = false |
Definition at line 71 of file backupTextPass.inc.
TextPassDumper::$history = WikiExporter::FULL |
Definition at line 35 of file backupTextPass.inc.
TextPassDumper::$input = "php://stdin" |
Definition at line 34 of file backupTextPass.inc.
Referenced by dump(), and readDump().
TextPassDumper::$lastPageWritten = false |
Definition at line 72 of file backupTextPass.inc.
TextPassDumper::$maxConsecutiveFailedTextRetrievals = 200 |
Definition at line 42 of file backupTextPass.inc.
TextPassDumper::$maxFailures = 5 |
Definition at line 41 of file backupTextPass.inc.
TextPassDumper::$maxTimeAllowed = 0 |
Definition at line 69 of file backupTextPass.inc.
TextPassDumper::$php = "php" |
Definition at line 45 of file backupTextPass.inc.
TextPassDumper::$prefetch = null |
Definition at line 33 of file backupTextPass.inc.
TextPassDumper::$prefetchCount = 0 |
Definition at line 37 of file backupTextPass.inc.
Referenced by showReport().
TextPassDumper::$prefetchCountLast = 0 |
Definition at line 38 of file backupTextPass.inc.
TextPassDumper::$spawn = false |
Definition at line 46 of file backupTextPass.inc.
bool resource TextPassDumper::$spawnErr = false |
Definition at line 62 of file backupTextPass.inc.
bool resource TextPassDumper::$spawnProc = false |
Definition at line 50 of file backupTextPass.inc.
bool resource TextPassDumper::$spawnRead = false |
Definition at line 58 of file backupTextPass.inc.
bool resource TextPassDumper::$spawnWrite = false |
Definition at line 54 of file backupTextPass.inc.
TextPassDumper::$timeExceeded = false |
Definition at line 70 of file backupTextPass.inc.
TextPassDumper::$xmlwriterobj = false |
Definition at line 64 of file backupTextPass.inc.