|
| __construct ( $db, HookContainer $hookContainer, RevisionStore $revisionStore, TitleParser $titleParser, $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 (PageIdentity $page) |
|
| 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 | schemaVersion () |
| Returns the default export schema version, as defined by the XmlDumpSchemaVersion setting.
|
|
|
| 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.
|
|
Definition at line 44 of file WikiExporter.php.
◆ __construct()
WikiExporter::__construct |
( |
| $db, |
|
|
HookContainer | $hookContainer, |
|
|
RevisionStore | $revisionStore, |
|
|
TitleParser | $titleParser, |
|
|
| $history = self::CURRENT, |
|
|
| $text = self::TEXT, |
|
|
| $limitNamespaces = null ) |
- Parameters
-
IDatabase | $db | |
HookContainer | $hookContainer | |
RevisionStore | $revisionStore | |
TitleParser | $titleParser | |
int | array | $history | One of WikiExporter::FULL, WikiExporter::CURRENT, WikiExporter::RANGE or WikiExporter::STABLE, or an associative array:
- offset: non-inclusive offset at which to start the query
- limit: maximum number of rows to return
- dir: "asc" or "desc" timestamp order
|
int | $text | One of WikiExporter::TEXT or WikiExporter::STUB |
null | array | $limitNamespaces | List of namespace numbers to limit results |
Definition at line 117 of file WikiExporter.php.
References $limitNamespaces.
◆ allLogs()
WikiExporter::allLogs |
( |
| ) |
|
◆ allPages()
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 174 of file WikiExporter.php.
References dumpFrom().
◆ closeStream()
WikiExporter::closeStream |
( |
| ) |
|
◆ do_list_authors()
WikiExporter::do_list_authors |
( |
| $cond | ) |
|
|
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.
- Parameters
-
Definition at line 272 of file WikiExporter.php.
References $res, and $revQuery.
Referenced by dumpPages().
◆ dumpFrom()
WikiExporter::dumpFrom |
( |
| $cond = '', |
|
|
| $orderRevs = false ) |
|
protected |
◆ dumpLogs()
WikiExporter::dumpLogs |
( |
| $cond | ) |
|
|
protected |
◆ dumpPages()
WikiExporter::dumpPages |
( |
| $cond, |
|
|
| $orderRevs ) |
|
protected |
◆ finishPageStreamOutput()
WikiExporter::finishPageStreamOutput |
( |
| $lastRow | ) |
|
|
protected |
Final page stream output, after all batches are complete.
- Parameters
-
stdClass | $lastRow | the last row output from the last batch (or null if none) |
Definition at line 608 of file WikiExporter.php.
Referenced by dumpPages().
◆ getSlotRowBatch()
WikiExporter::getSlotRowBatch |
( |
| $results, |
|
|
& | $carry = null ) |
|
protected |
Returns all slot rows for a revision.
Takes and returns a carry row from the last batch;
- Parameters
-
IResultWrapper | array | $results | |
null | stdClass | &$carry | A row carried over from the last call to getSlotRowBatch() |
- Returns
- stdClass[]
Definition at line 581 of file WikiExporter.php.
Referenced by outputPageStreamBatch().
◆ logsByRange()
WikiExporter::logsByRange |
( |
| $start, |
|
|
| $end ) |
◆ openStream()
WikiExporter::openStream |
( |
| ) |
|
◆ outputLogStream()
WikiExporter::outputLogStream |
( |
| $resultset | ) |
|
|
protected |
- Parameters
-
- Returns
- int|null the log_id value of the last item output, or null if none
Definition at line 622 of file WikiExporter.php.
Referenced by dumpLogs().
◆ outputPageStreamBatch()
WikiExporter::outputPageStreamBatch |
( |
| $results, |
|
|
| $lastRow ) |
|
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.
- Parameters
-
IResultWrapper | $results | |
stdClass | null | $lastRow | the last row output from the previous call (or null if none) |
- Returns
- stdClass the last row processed
Definition at line 521 of file WikiExporter.php.
References getSlotRowBatch().
Referenced by dumpPages().
◆ pageByName()
WikiExporter::pageByName |
( |
| $name | ) |
|
◆ pageByTitle()
◆ pagesByName()
WikiExporter::pagesByName |
( |
| $names | ) |
|
◆ pagesByRange()
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.
- Parameters
-
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 186 of file WikiExporter.php.
References dumpFrom().
◆ revsByRange()
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.
- Parameters
-
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 208 of file WikiExporter.php.
References dumpFrom().
◆ schemaVersion()
static WikiExporter::schemaVersion |
( |
| ) |
|
|
static |
Returns the default export schema version, as defined by the XmlDumpSchemaVersion setting.
- Returns
- string
Definition at line 99 of file WikiExporter.php.
◆ setOutputSink()
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.
- Parameters
-
Definition at line 155 of file WikiExporter.php.
◆ setSchemaVersion()
WikiExporter::setSchemaVersion |
( |
| $schemaVersion | ) |
|
- Parameters
-
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 144 of file WikiExporter.php.
◆ $author_list
string WikiExporter::$author_list = "" |
◆ $db
◆ $dumpUploadFileContents
bool WikiExporter::$dumpUploadFileContents = false |
◆ $dumpUploads
bool WikiExporter::$dumpUploads = false |
◆ $history
array int WikiExporter::$history |
|
protected |
◆ $limitNamespaces
array null WikiExporter::$limitNamespaces |
|
protected |
◆ $list_authors
bool WikiExporter::$list_authors = false |
Return distinct author list (when not returning full history)
Definition at line 46 of file WikiExporter.php.
◆ $sink
◆ $text
◆ BATCH_SIZE
const WikiExporter::BATCH_SIZE = 50000 |
|
protected |
◆ CURRENT
const WikiExporter::CURRENT = 2 |
◆ FULL
const WikiExporter::FULL = 1 |
◆ LOGS
const WikiExporter::LOGS = 8 |
◆ RANGE
const WikiExporter::RANGE = 16 |
◆ STABLE
const WikiExporter::STABLE = 4 |
◆ STUB
const WikiExporter::STUB = XmlDumpWriter::WRITE_STUB |
◆ TEXT
const WikiExporter::TEXT = XmlDumpWriter::WRITE_CONTENT |
The documentation for this class was generated from the following file: