MediaWiki REL1_35
|
Public Member Functions | |
__construct ( $db, $history=self::CURRENT, $text=self::TEXT, $limitNamespaces=null) | |
allLogs () | |
allPages () | |
Dumps a series of page and revision records for all pages in the database, either including complete history or only the most recent version. | |
closeStream () | |
logsByRange ( $start, $end) | |
openStream () | |
pageByName ( $name) | |
pageByTitle ( $title) | |
pagesByName ( $names) | |
pagesByRange ( $start, $end, $orderRevs) | |
Dumps a series of page and revision records for those pages in the database falling within the page_id range given. | |
revsByRange ( $start, $end) | |
Dumps a series of page and revision records for those pages in the database with revisions falling within the rev_id range given. | |
setOutputSink (&$sink) | |
Set the DumpOutput or DumpFilter object which will receive various row objects and XML output for filtering. | |
setSchemaVersion ( $schemaVersion) | |
Static Public Member Functions | |
static | schemaVersion () |
Returns the default export schema version, as defined by $wgXmlDumpSchemaVersion. | |
Public Attributes | |
string | $author_list = "" |
bool | $dumpUploadFileContents = false |
bool | $dumpUploads = false |
bool | $list_authors = false |
Return distinct author list (when not returning full history) | |
DumpOutput | $sink |
int | $text |
const | CURRENT = 2 |
const | FULL = 1 |
const | LOGS = 8 |
const | RANGE = 16 |
const | STABLE = 4 |
const | STUB = XmlDumpWriter::WRITE_STUB |
const | TEXT = XmlDumpWriter::WRITE_CONTENT |
Protected Member Functions | |
do_list_authors ( $cond) | |
Generates the distinct list of authors of an article Not called by default (depends on $this->list_authors) Can be set by Special:Export when not exporting whole history. | |
dumpFrom ( $cond='', $orderRevs=false) | |
dumpLogs ( $cond) | |
dumpPages ( $cond, $orderRevs) | |
finishPageStreamOutput ( $lastRow) | |
Final page stream output, after all batches are complete. | |
getSlotRowBatch ( $results, &$carry=null) | |
Returns all slot rows for a revision. | |
outputLogStream ( $resultset) | |
outputPageStreamBatch ( $results, $lastRow) | |
Runs through a query result set dumping page, revision, and slot records. | |
Protected Attributes | |
IDatabase | $db |
array int | $history |
array null | $limitNamespaces |
const | BATCH_SIZE = 50000 |
Private Attributes | |
HookRunner | $hookRunner |
RevisionStore | $revisionStore |
XmlDumpWriter | $writer |
Definition at line 40 of file WikiExporter.php.
WikiExporter::__construct | ( | $db, | |
$history = self::CURRENT , |
|||
$text = self::TEXT , |
|||
$limitNamespaces = null |
|||
) |
IDatabase | $db | |
int | array | $history | One of WikiExporter::FULL, WikiExporter::CURRENT, WikiExporter::RANGE or WikiExporter::STABLE, or an associative array:
|
int | $text | One of WikiExporter::TEXT or WikiExporter::STUB |
null | array | $limitNamespaces | Comma-separated list of namespace numbers to limit results |
Definition at line 108 of file WikiExporter.php.
References $db, $history, $limitNamespaces, and $text.
WikiExporter::allLogs | ( | ) |
Definition at line 233 of file WikiExporter.php.
References dumpFrom().
WikiExporter::allPages | ( | ) |
Dumps a series of page and revision records for all pages in the database, either including complete history or only the most recent version.
Definition at line 160 of file WikiExporter.php.
References dumpFrom().
WikiExporter::closeStream | ( | ) |
Definition at line 150 of file WikiExporter.php.
|
protected |
Generates the distinct list of authors of an article Not called by default (depends on $this->list_authors) Can be set by Special:Export when not exporting whole history.
string | $cond |
Definition at line 256 of file WikiExporter.php.
References $res, and $revQuery.
Referenced by dumpPages().
|
protected |
string | $cond | |
bool | $orderRevs |
MWException | |
Exception |
Definition at line 295 of file WikiExporter.php.
References dumpLogs(), and dumpPages().
Referenced by allLogs(), allPages(), logsByRange(), pageByTitle(), pagesByRange(), and revsByRange().
|
protected |
string | $cond |
Exception |
Definition at line 307 of file WikiExporter.php.
References BATCH_SIZE, and outputLogStream().
Referenced by dumpFrom().
|
protected |
string | $cond | |
bool | $orderRevs |
MWException | |
Exception |
Definition at line 364 of file WikiExporter.php.
References $revQuery, BATCH_SIZE, do_list_authors(), finishPageStreamOutput(), and outputPageStreamBatch().
Referenced by dumpFrom().
|
protected |
Final page stream output, after all batches are complete.
object | $lastRow | the last row output from the last batch (or null if none) |
Definition at line 584 of file WikiExporter.php.
References $author_list.
Referenced by dumpPages().
|
protected |
Returns all slot rows for a revision.
Takes and returns a carry row from the last batch;
IResultWrapper | array | $results | |
null | object | &$carry | A row carried over from the last call to getSlotRowBatch() |
Definition at line 557 of file WikiExporter.php.
Referenced by outputPageStreamBatch().
WikiExporter::logsByRange | ( | $start, | |
$end | |||
) |
int | $start | |
int | $end |
Definition at line 241 of file WikiExporter.php.
References dumpFrom().
WikiExporter::openStream | ( | ) |
Definition at line 145 of file WikiExporter.php.
|
protected |
IResultWrapper | $resultset |
Definition at line 598 of file WikiExporter.php.
Referenced by dumpLogs().
|
protected |
Runs through a query result set dumping page, revision, and slot records.
The result set should join the page, revision, slots, and content tables, and be sorted/grouped by page and revision to avoid duplicate page records in the output.
IResultWrapper | $results | |
object | $lastRow | the last row output from the previous call (or null if none) |
Definition at line 503 of file WikiExporter.php.
References getSlotRowBatch().
Referenced by dumpPages().
WikiExporter::pageByName | ( | $name | ) |
string | $name |
MWException |
Definition at line 215 of file WikiExporter.php.
References $title, and pageByTitle().
Referenced by pagesByName().
WikiExporter::pageByTitle | ( | $title | ) |
Title | $title |
Definition at line 205 of file WikiExporter.php.
References $title, and dumpFrom().
Referenced by pageByName().
WikiExporter::pagesByName | ( | $names | ) |
WikiExporter::pagesByRange | ( | $start, | |
$end, | |||
$orderRevs | |||
) |
Dumps a series of page and revision records for those pages in the database falling within the page_id range given.
int | $start | Inclusive lower limit (this id is included) |
int | $end | Exclusive upper limit (this id is not included) If 0, no upper limit. |
bool | $orderRevs | order revisions within pages in ascending order |
Definition at line 172 of file WikiExporter.php.
References dumpFrom().
WikiExporter::revsByRange | ( | $start, | |
$end | |||
) |
Dumps a series of page and revision records for those pages in the database with revisions falling within the rev_id range given.
int | $start | Inclusive lower limit (this id is included) |
int | $end | Exclusive upper limit (this id is not included) If 0, no upper limit. |
Definition at line 194 of file WikiExporter.php.
References dumpFrom().
|
static |
Returns the default export schema version, as defined by $wgXmlDumpSchemaVersion.
Definition at line 92 of file WikiExporter.php.
References $wgXmlDumpSchemaVersion.
Referenced by BackupDumper\__construct(), ApiQuery\getAllowedParams(), and BackupDumper\processOptions().
WikiExporter::setOutputSink | ( | & | $sink | ) |
Set the DumpOutput or DumpFilter object which will receive various row objects and XML output for filtering.
Filters can be chained or used as callbacks.
DumpOutput | DumpFilter | &$sink |
Definition at line 141 of file WikiExporter.php.
References $sink.
WikiExporter::setSchemaVersion | ( | $schemaVersion | ) |
string | $schemaVersion | which schema version the generated XML should comply to. One of the values from self::$supportedSchemas, using the XML_DUMP_SCHEMA_VERSION_XX constants. |
Definition at line 130 of file WikiExporter.php.
string WikiExporter::$author_list = "" |
Definition at line 51 of file WikiExporter.php.
Referenced by finishPageStreamOutput().
|
protected |
Definition at line 74 of file WikiExporter.php.
Referenced by __construct().
bool WikiExporter::$dumpUploadFileContents = false |
Definition at line 48 of file WikiExporter.php.
bool WikiExporter::$dumpUploads = false |
Definition at line 45 of file WikiExporter.php.
|
protected |
Definition at line 77 of file WikiExporter.php.
Referenced by __construct().
|
private |
Definition at line 86 of file WikiExporter.php.
|
protected |
Definition at line 80 of file WikiExporter.php.
Referenced by __construct().
bool WikiExporter::$list_authors = false |
Return distinct author list (when not returning full history)
Definition at line 42 of file WikiExporter.php.
|
private |
Definition at line 83 of file WikiExporter.php.
DumpOutput WikiExporter::$sink |
Definition at line 68 of file WikiExporter.php.
Referenced by setOutputSink().
int WikiExporter::$text |
Definition at line 65 of file WikiExporter.php.
Referenced by __construct().
|
private |
Definition at line 71 of file WikiExporter.php.
|
protected |
Definition at line 62 of file WikiExporter.php.
Referenced by dumpLogs(), and dumpPages().
const WikiExporter::CURRENT = 2 |
Definition at line 54 of file WikiExporter.php.
Referenced by SpecialExport\execute(), DumpBackup\execute(), BackupDumper\initProgress(), and TextPassDumper\processOptions().
const WikiExporter::FULL = 1 |
Definition at line 53 of file WikiExporter.php.
Referenced by SpecialExport\doExport(), SpecialExport\execute(), DumpBackup\execute(), and TextPassDumper\processOptions().
const WikiExporter::LOGS = 8 |
Definition at line 56 of file WikiExporter.php.
Referenced by BackupDumper\dump(), and DumpBackup\execute().
const WikiExporter::RANGE = 16 |
Definition at line 57 of file WikiExporter.php.
Referenced by DumpBackup\execute().
const WikiExporter::STABLE = 4 |
Definition at line 55 of file WikiExporter.php.
Referenced by DumpBackup\execute().
const WikiExporter::STUB = XmlDumpWriter::WRITE_STUB |
Definition at line 60 of file WikiExporter.php.
Referenced by DumpBackup\execute().
const WikiExporter::TEXT = XmlDumpWriter::WRITE_CONTENT |
Definition at line 59 of file WikiExporter.php.
Referenced by DumpBackup\execute().