MediaWiki  REL1_19
TextPassDumper Class Reference
Inheritance diagram for TextPassDumper:
Collaboration diagram for TextPassDumper:

List of all members.

Public Member Functions

 characterData ($parser, $data)
 checkIfTimeExceeded ()
 clearOpenElement ($style)
 dump ($history, $text=WikiExporter::TEXT)
 endElement ($parser, $name)
 finalOptionCheck ()
 getText ($id)
 initProgress ($history)
 Initialise starting time and maximum revision count.
 openSpawn ()
 processFileOpt ($val, $param)
 processOption ($opt, $val, $param)
 readDump ($input)
 setTimeExceeded ()
 showReport ()
 Overridden to include prefetch ratio if enabled.
 startElement ($parser, $name, $attribs)

Public Attributes

 $checkpointFiles = array()
 $checkpointJustWritten = false
 $failedTextRetrievals = 0
 $failures = 0
 $failureTimeout = 5
 $fetchCount = 0
 $fetchCountLast = 0
 $firstPageWritten = false
 $history = WikiExporter::FULL
 $input = "php://stdin"
 $lastPageWritten = false
 $maxConsecutiveFailedTextRetrievals = 200
 $maxFailures = 5
 $maxTimeAllowed = 0
 $php = "php"
 $prefetch = null
 $prefetchCount = 0
 $prefetchCountLast = 0
 $spawn = false
 $spawnErr = false
 $spawnProc = false
 $spawnRead = false
 $spawnWrite = false
 $timeExceeded = false
 $xmlwriterobj = false

Protected Attributes

 $db

Private Member Functions

 closeSpawn ()
 doGetText ($id)
 getTextDb ($id)
 May throw a database error if, say, the server dies during query.
 getTextDbSafe ($id)
 Fetch a text revision from the database, retrying in case of failure.
 getTextSpawned ($id)
 getTextSpawnedOnce ($id)

Detailed Description

Definition at line 35 of file dumpTextPass.php.


Member Function Documentation

TextPassDumper::characterData ( parser,
data 
)

Definition at line 630 of file dumpTextPass.php.

References clearOpenElement().

Referenced by startElement().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 233 of file dumpTextPass.php.

Referenced by readDump().

Here is the caller graph for this function:

Definition at line 650 of file dumpTextPass.php.

References Xml\element().

Referenced by characterData(), endElement(), and startElement().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 474 of file dumpTextPass.php.

References wfRestoreWarnings(), and wfSuppressWarnings().

Referenced by doGetText(), and dump().

Here is the call graph for this function:

Here is the caller graph for this function:

TextPassDumper::doGetText ( id) [private]

Definition at line 338 of file dumpTextPass.php.

References closeSpawn(), getTextDbSafe(), getTextSpawned(), openSpawn(), and BackupDumper\progress().

Referenced by getText().

Here is the call graph for this function:

Here is the caller graph for this function:

TextPassDumper::dump ( history,
text = WikiExporter::TEXT 
)

Reimplemented from BackupDumper.

Definition at line 79 of file dumpTextPass.php.

References $input, $result, BackupDumper\backupDb(), closeSpawn(), finalOptionCheck(), initProgress(), WikiError\isError(), readDump(), and BackupDumper\report().

Here is the call graph for this function:

TextPassDumper::endElement ( parser,
name 
)

Definition at line 571 of file dumpTextPass.php.

References clearOpenElement().

Here is the call graph for this function:

Definition at line 240 of file dumpTextPass.php.

References $count.

Referenced by dump().

Here is the caller graph for this function:

Definition at line 319 of file dumpTextPass.php.

References $dbr, doGetText(), and wfGetDB().

Referenced by startElement().

Here is the call graph for this function:

Here is the caller graph for this function:

TextPassDumper::getTextDb ( id) [private]

May throw a database error if, say, the server dies during query.

Parameters:
$id
Returns:
bool|string

Definition at line 407 of file dumpTextPass.php.

References $wgContLang, and Revision\getRevisionText().

Referenced by getTextDbSafe().

Here is the call graph for this function:

Here is the caller graph for this function:

TextPassDumper::getTextDbSafe ( id) [private]

Fetch a text revision from the database, retrying in case of failure.

This may survive some transitory errors by reconnecting, but may not survive a long-term server outage.

FIXME: WTF? Why is it using a loop and then returning unconditionally?

Definition at line 391 of file dumpTextPass.php.

References getTextDb().

Referenced by doGetText().

Here is the call graph for this function:

Here is the caller graph for this function:

TextPassDumper::getTextSpawned ( id) [private]

Definition at line 422 of file dumpTextPass.php.

References getTextSpawnedOnce(), openSpawn(), wfRestoreWarnings(), and wfSuppressWarnings().

Referenced by doGetText().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 491 of file dumpTextPass.php.

References $ok, $wgContLang, and BackupDumper\progress().

Referenced by getTextSpawned().

Here is the call graph for this function:

Here is the caller graph for this function:

Initialise starting time and maximum revision count.

We'll make ETA calculations based an progress, assuming relatively constant per-revision rate.

Parameters:
$historyInteger: WikiExporter::CURRENT or WikiExporter::FULL

Reimplemented from BackupDumper.

Definition at line 74 of file dumpTextPass.php.

Referenced by dump().

Here is the caller graph for this function:

Definition at line 433 of file dumpTextPass.php.

References $IP, BackupDumper\progress(), and wfWikiID().

Referenced by doGetText(), and getTextSpawned().

Here is the call graph for this function:

Here is the caller graph for this function:

TextPassDumper::processFileOpt ( val,
param 
)

Definition at line 147 of file dumpTextPass.php.

Referenced by processOption().

Here is the caller graph for this function:

TextPassDumper::processOption ( opt,
val,
param 
)

Reimplemented from BackupDumper.

Definition at line 114 of file dumpTextPass.php.

References $IP, $url, WikiExporter\CURRENT, WikiExporter\FULL, and processFileOpt().

Here is the call graph for this function:

Definition at line 260 of file dumpTextPass.php.

References $input, checkIfTimeExceeded(), setTimeExceeded(), and wfDebug().

Referenced by dump().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 229 of file dumpTextPass.php.

Referenced by readDump().

Here is the caller graph for this function:

Overridden to include prefetch ratio if enabled.

Reimplemented from BackupDumper.

Definition at line 175 of file dumpTextPass.php.

References BackupDumper\progress(), BackupDumper\revCount(), wfTime(), wfTimestamp(), and wfWikiID().

Here is the call graph for this function:

TextPassDumper::startElement ( parser,
name,
attribs 
)

Definition at line 541 of file dumpTextPass.php.

References characterData(), clearOpenElement(), and getText().

Here is the call graph for this function:


Member Data Documentation

TextPassDumper::$checkpointFiles = array()

Definition at line 67 of file dumpTextPass.php.

TextPassDumper::$checkpointJustWritten = false

Definition at line 66 of file dumpTextPass.php.

TextPassDumper::$db [protected]

Definition at line 72 of file dumpTextPass.php.

TextPassDumper::$failedTextRetrievals = 0

Definition at line 46 of file dumpTextPass.php.

TextPassDumper::$failures = 0

Definition at line 44 of file dumpTextPass.php.

TextPassDumper::$failureTimeout = 5

Definition at line 48 of file dumpTextPass.php.

TextPassDumper::$fetchCount = 0

Definition at line 39 of file dumpTextPass.php.

TextPassDumper::$fetchCountLast = 0

Definition at line 42 of file dumpTextPass.php.

TextPassDumper::$firstPageWritten = false

Definition at line 64 of file dumpTextPass.php.

TextPassDumper::$history = WikiExporter::FULL

Definition at line 38 of file dumpTextPass.php.

TextPassDumper::$input = "php://stdin"

Definition at line 37 of file dumpTextPass.php.

Referenced by dump(), and readDump().

TextPassDumper::$lastPageWritten = false

Definition at line 65 of file dumpTextPass.php.

TextPassDumper::$maxConsecutiveFailedTextRetrievals = 200

Definition at line 47 of file dumpTextPass.php.

TextPassDumper::$maxFailures = 5

Definition at line 45 of file dumpTextPass.php.

TextPassDumper::$maxTimeAllowed = 0

Definition at line 62 of file dumpTextPass.php.

TextPassDumper::$php = "php"

Definition at line 50 of file dumpTextPass.php.

TextPassDumper::$prefetch = null

Definition at line 36 of file dumpTextPass.php.

TextPassDumper::$prefetchCount = 0

Definition at line 40 of file dumpTextPass.php.

TextPassDumper::$prefetchCountLast = 0

Definition at line 41 of file dumpTextPass.php.

TextPassDumper::$spawn = false

Definition at line 51 of file dumpTextPass.php.

TextPassDumper::$spawnErr = false

Definition at line 55 of file dumpTextPass.php.

TextPassDumper::$spawnProc = false

Definition at line 52 of file dumpTextPass.php.

TextPassDumper::$spawnRead = false

Definition at line 54 of file dumpTextPass.php.

TextPassDumper::$spawnWrite = false

Definition at line 53 of file dumpTextPass.php.

TextPassDumper::$timeExceeded = false

Definition at line 63 of file dumpTextPass.php.

TextPassDumper::$xmlwriterobj = false

Definition at line 57 of file dumpTextPass.php.


The documentation for this class was generated from the following file: