MediaWiki  REL1_24
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

 $maxTimeAllowed = 0
 $prefetch = null

Protected Attributes

 $checkpointFiles = array()
 $checkpointJustWritten = false
DatabaseBase $db
 $failureTimeout = 5
 $fetchCount = 0
 $fetchCountLast = 0
 $firstPageWritten = false
 $history = WikiExporter::FULL
 $input = "php://stdin"
 $lastPageWritten = false
 $maxConsecutiveFailedTextRetrievals = 200
 $maxFailures = 5
 $php = "php"
 $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

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

Definition at line 843 of file backupTextPass.inc.

Definition at line 652 of file backupTextPass.inc.

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

Reimplemented from BackupDumper.

Definition at line 138 of file backupTextPass.inc.

References initProgress().

TextPassDumper::endElement ( parser,
name 
)

Definition at line 765 of file backupTextPass.inc.

Definition at line 315 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:
string$idThe revision id to get the text for
Returns:
string The revision text for $id, or ""
Exceptions:
MWException

Definition at line 433 of file backupTextPass.inc.

TextPassDumper::getTextDb ( id) [private]

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

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

Definition at line 580 of file backupTextPass.inc.

TextPassDumper::getTextSpawned ( id) [private]

Definition at line 599 of file backupTextPass.inc.

Definition at line 673 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:
int$historyWikiExporter::CURRENT or WikiExporter::FULL

Reimplemented from BackupDumper.

Definition at line 133 of file backupTextPass.inc.

Referenced by dump().

Definition at line 611 of file backupTextPass.inc.

TextPassDumper::processFileOpt ( val,
param 
)

Definition at line 212 of file backupTextPass.inc.

TextPassDumper::processOption ( opt,
val,
param 
)

Reimplemented from BackupDumper.

Definition at line 179 of file backupTextPass.inc.

Exceptions:
MWExceptionFailure to parse XML input
Parameters:
string$input
Returns:
bool

Definition at line 344 of file backupTextPass.inc.

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

Definition at line 301 of file backupTextPass.inc.

Overridden to include prefetch ratio if enabled.

Reimplemented from BackupDumper.

Definition at line 241 of file backupTextPass.inc.

TextPassDumper::startElement ( parser,
name,
attribs 
)

Definition at line 735 of file backupTextPass.inc.


Member Data Documentation

TextPassDumper::$checkpointFiles = array() [protected]

Definition at line 76 of file backupTextPass.inc.

TextPassDumper::$checkpointJustWritten = false [protected]

Definition at line 75 of file backupTextPass.inc.

DatabaseBase TextPassDumper::$db [protected]

Definition at line 80 of file backupTextPass.inc.

TextPassDumper::$failureTimeout = 5 [protected]

Definition at line 49 of file backupTextPass.inc.

TextPassDumper::$fetchCount = 0 [protected]

Definition at line 42 of file backupTextPass.inc.

TextPassDumper::$fetchCountLast = 0 [protected]

Definition at line 45 of file backupTextPass.inc.

TextPassDumper::$firstPageWritten = false [protected]

Definition at line 73 of file backupTextPass.inc.

TextPassDumper::$history = WikiExporter::FULL [protected]

Definition at line 41 of file backupTextPass.inc.

TextPassDumper::$input = "php://stdin" [protected]

Definition at line 40 of file backupTextPass.inc.

TextPassDumper::$lastPageWritten = false [protected]

Definition at line 74 of file backupTextPass.inc.

TextPassDumper::$maxConsecutiveFailedTextRetrievals = 200 [protected]

Definition at line 48 of file backupTextPass.inc.

TextPassDumper::$maxFailures = 5 [protected]

Definition at line 47 of file backupTextPass.inc.

TextPassDumper::$maxTimeAllowed = 0

Definition at line 38 of file backupTextPass.inc.

TextPassDumper::$php = "php" [protected]

Definition at line 51 of file backupTextPass.inc.

TextPassDumper::$prefetch = null

Definition at line 33 of file backupTextPass.inc.

TextPassDumper::$prefetchCount = 0 [protected]

Definition at line 43 of file backupTextPass.inc.

TextPassDumper::$prefetchCountLast = 0 [protected]

Definition at line 44 of file backupTextPass.inc.

TextPassDumper::$spawn = false [protected]

Definition at line 52 of file backupTextPass.inc.

bool resource TextPassDumper::$spawnErr = false [protected]

Definition at line 68 of file backupTextPass.inc.

bool resource TextPassDumper::$spawnProc = false [protected]

Definition at line 56 of file backupTextPass.inc.

bool resource TextPassDumper::$spawnRead = false [protected]

Definition at line 64 of file backupTextPass.inc.

bool resource TextPassDumper::$spawnWrite = false [protected]

Definition at line 60 of file backupTextPass.inc.

TextPassDumper::$timeExceeded = false [protected]

Definition at line 72 of file backupTextPass.inc.

TextPassDumper::$xmlwriterobj = false [protected]

Definition at line 70 of file backupTextPass.inc.


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