MediaWiki  REL1_19
WikiExporter Class Reference

List of all members.

Public Member Functions

 __construct (&$db, $history=WikiExporter::CURRENT, $buffer=WikiExporter::BUFFER, $text=WikiExporter::TEXT)
 If using WikiExporter::STREAM to stream a large amount of data, provide a database connection which is not managed by LoadBalancer to read from: some history blob types will make additional queries to pull source data while the main query is still running.
 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)
 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.

Public Attributes

 $author_list = ""
 $dumpUploadFileContents = false
 $dumpUploads = false
 $list_authors = false
const BUFFER = 0
const CURRENT = 2
const FULL = 1
const LOGS = 8
const RANGE = 16
const STABLE = 4
const STREAM = 1
const STUB = 1
const TEXT = 0

Protected Member Functions

 do_list_authors ($cond)
 dumpFrom ($cond= '')
 outputLogStream ($resultset)
 outputPageStream ($resultset)
 Runs through a query result set dumping page and revision records.

Detailed Description

Definition at line 33 of file Export.php.


Constructor & Destructor Documentation

WikiExporter::__construct ( &$  db,
history = WikiExporter::CURRENT,
buffer = WikiExporter::BUFFER,
text = WikiExporter::TEXT 
)

If using WikiExporter::STREAM to stream a large amount of data, provide a database connection which is not managed by LoadBalancer to read from: some history blob types will make additional queries to pull source data while the main query is still running.

Parameters:
$dbDatabaseBase
$historyMixed: 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
$bufferInt: one of WikiExporter::BUFFER or WikiExporter::STREAM
$textInt: one of WikiExporter::TEXT or WikiExporter::STUB

Definition at line 69 of file Export.php.


Member Function Documentation

Definition at line 163 of file Export.php.

References dumpFrom().

Here is the call graph for this function:

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 105 of file Export.php.

References dumpFrom().

Here is the call graph for this function:

Definition at line 95 of file Export.php.

References $output.

WikiExporter::do_list_authors ( cond) [protected]

Definition at line 178 of file Export.php.

References $res, Revision\DELETED_USER, wfProfileIn(), and wfProfileOut().

Referenced by dumpFrom().

Here is the call graph for this function:

Here is the caller graph for this function:

WikiExporter::dumpFrom ( cond = '') [protected]

Definition at line 208 of file Export.php.

References $result, CURRENT, do_list_authors(), FULL, LogEventsList\getExcludeClause(), outputLogStream(), outputPageStream(), RANGE, STABLE, STREAM, STUB, wfProfileIn(), wfProfileOut(), and wfRunHooks().

Referenced by allLogs(), allPages(), logsByRange(), pageByTitle(), pagesByRange(), and revsByRange().

Here is the call graph for this function:

Here is the caller graph for this function:

WikiExporter::logsByRange ( start,
end 
)

Definition at line 167 of file Export.php.

References dumpFrom().

Here is the call graph for this function:

Definition at line 90 of file Export.php.

References $output.

WikiExporter::outputLogStream ( resultset) [protected]

Definition at line 366 of file Export.php.

References $output.

Referenced by dumpFrom().

Here is the caller graph for this function:

WikiExporter::outputPageStream ( resultset) [protected]

Runs through a query result set dumping page and revision records.

The result set should be sorted/grouped by page to avoid duplicate page records in the output.

The result set will be freed once complete. Should be safe for streaming (non-buffered) queries, as long as it was made on a separate database connection not managed by LoadBalancer; some blob storage types will make queries to pull source data.

Parameters:
$resultsetResultWrapper

Definition at line 334 of file Export.php.

References $output, dumpUploadFileContents, and dumpUploads.

Referenced by dumpFrom().

Here is the caller graph for this function:

Definition at line 148 of file Export.php.

References $title, Title\newFromText(), and pageByTitle().

Referenced by pagesByName().

Here is the call graph for this function:

Here is the caller graph for this function:

Parameters:
$titleTitle

Definition at line 142 of file Export.php.

References $title, and dumpFrom().

Referenced by pageByName().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 157 of file Export.php.

References pageByName().

Here is the call graph for this function:

WikiExporter::pagesByRange ( start,
end 
)

Dumps a series of page and revision records for those pages in the database falling within the page_id range given.

Parameters:
$startInt: inclusive lower limit (this id is included)
$endInt: Exclusive upper limit (this id is not included) If 0, no upper limit.

Definition at line 116 of file Export.php.

References dumpFrom().

Here is the call graph for this function:

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:
$startInt: inclusive lower limit (this id is included)
$endInt: Exclusive upper limit (this id is not included) If 0, no upper limit.

Definition at line 131 of file Export.php.

References dumpFrom().

Here is the call graph for this function:

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:
$sinkmixed

Definition at line 86 of file Export.php.


Member Data Documentation

WikiExporter::$author_list = ""

Definition at line 35 of file Export.php.

WikiExporter::$dumpUploadFileContents = false

Definition at line 38 of file Export.php.

WikiExporter::$dumpUploads = false

Definition at line 37 of file Export.php.

WikiExporter::$list_authors = false

Definition at line 34 of file Export.php.

Definition at line 46 of file Export.php.

Referenced by SpecialExport\doExport().

const WikiExporter::LOGS = 8

Definition at line 43 of file Export.php.

Referenced by BackupDumper\dump().

const WikiExporter::RANGE = 16

Definition at line 44 of file Export.php.

Referenced by dumpFrom().

Definition at line 42 of file Export.php.

Referenced by dumpFrom().

Definition at line 47 of file Export.php.

Referenced by SpecialExport\doExport(), BackupDumper\dump(), and dumpFrom().

const WikiExporter::STUB = 1

Definition at line 50 of file Export.php.

Referenced by dumpFrom().

const WikiExporter::TEXT = 0

Definition at line 49 of file Export.php.


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