MediaWiki  REL1_22
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)
 Tries to get the revision text for a revision id.
 initProgress ($history=WikiExporter::FULL)
 Initialise starting time and maximum revision count.
 openSpawn ()
 processFileOpt ($val, $param)
 processOption ($opt, $val, $param)
 readDump ($input)
 rotateDb ()
 Drop the database connection $this->db and try to get a new one.
 setTimeExceeded ()
 showReport ()
 Overridden to include prefetch ratio if enabled.
 startElement ($parser, $name, $attribs)

Public Attributes

 $checkpointFiles = array()
 $checkpointJustWritten = false
 $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
bool resource $spawnErr = false
bool resource $spawnProc = false
bool resource $spawnRead = false
bool resource $spawnWrite = false
 $timeExceeded = false
 $xmlwriterobj = false

Protected Attributes

DatabaseBase $db

Private Member Functions

 closeSpawn ()
 getTextDb ($id)
 May throw a database error if, say, the server dies during query.
 getTextSpawned ($id)
 getTextSpawnedOnce ($id)

Detailed Description

Definition at line 32 of file backupTextPass.inc.


Member Function Documentation

TextPassDumper::characterData ( parser,
data 
)

Definition at line 801 of file backupTextPass.inc.

Definition at line 296 of file backupTextPass.inc.

Referenced by readDump().

Definition at line 821 of file backupTextPass.inc.

Definition at line 631 of file backupTextPass.inc.

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

Reimplemented from BackupDumper.

Definition at line 136 of file backupTextPass.inc.

References initProgress().

TextPassDumper::endElement ( parser,
name 
)

Definition at line 742 of file backupTextPass.inc.

Definition at line 303 of file backupTextPass.inc.

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.

Parameters:
$idstring The revision id to get the text for
Returns:
string The revision text for $id, or ""
Exceptions:
MWException

Definition at line 411 of file backupTextPass.inc.

TextPassDumper::getTextDb ( id) [private]

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

Parameters:
$id
Returns:
bool|string
Exceptions:
MWException

Definition at line 561 of file backupTextPass.inc.

TextPassDumper::getTextSpawned ( id) [private]

Definition at line 579 of file backupTextPass.inc.

Definition at line 652 of file backupTextPass.inc.

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 131 of file backupTextPass.inc.

Referenced by dump().

Definition at line 590 of file backupTextPass.inc.

TextPassDumper::processFileOpt ( val,
param 
)

Definition at line 210 of file backupTextPass.inc.

TextPassDumper::processOption ( opt,
val,
param 
)

Reimplemented from BackupDumper.

Definition at line 177 of file backupTextPass.inc.

Exceptions:
MWExceptionFailure to parse XML input
Returns:
true

Definition at line 327 of file backupTextPass.inc.

References $input, $parser, array(), checkIfTimeExceeded(), setTimeExceeded(), wfDebug(), and wfMessage().

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.

Exceptions:
MWException

Definition at line 92 of file backupTextPass.inc.

Definition at line 292 of file backupTextPass.inc.

Referenced by readDump().

Overridden to include prefetch ratio if enabled.

Reimplemented from BackupDumper.

Definition at line 238 of file backupTextPass.inc.

TextPassDumper::startElement ( parser,
name,
attribs 
)

Definition at line 712 of file backupTextPass.inc.


Member Data Documentation

TextPassDumper::$checkpointFiles = array()

Definition at line 74 of file backupTextPass.inc.

TextPassDumper::$checkpointJustWritten = false

Definition at line 73 of file backupTextPass.inc.

DatabaseBase TextPassDumper::$db [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.

TextPassDumper::$fetchCountLast = 0

Definition at line 39 of file backupTextPass.inc.

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 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.

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.


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