[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Base classes for dumps and export Copyright © 2003, 2005, 2006 Brion Vibber <[email protected]> https://www.mediawiki.org/
File Size: | 1570 lines (41 kb) |
Included or required: | 0 times |
Referenced: | 13 times |
Includes or requires: | 0 files |
WikiExporter:: (17 methods):
schemaVersion()
__construct()
setOutputSink()
openStream()
closeStream()
allPages()
pagesByRange()
revsByRange()
pageByTitle()
pageByName()
pagesByName()
allLogs()
logsByRange()
do_list_authors()
dumpFrom()
outputPageStream()
outputLogStream()
XmlDumpWriter:: (19 methods):
schemaVersion()
openStream()
siteInfo()
sitename()
dbname()
generator()
homelink()
caseSetting()
namespaces()
closeStream()
openPage()
closePage()
writeRevision()
writeLogItem()
writeTimestamp()
writeContributor()
writeUploads()
writeUpload()
canonicalTitle()
DumpOutput:: (10 methods):
writeOpenStream()
writeCloseStream()
writeOpenPage()
writeClosePage()
writeRevision()
writeLogItem()
write()
closeRenameAndReopen()
closeAndRename()
getFilenames()
DumpFileOutput:: (8 methods):
__construct()
writeCloseStream()
write()
closeRenameAndReopen()
renameOrException()
checkRenameArgCount()
closeAndRename()
getFilenames()
DumpPipeOutput:: (5 methods):
__construct()
writeCloseStream()
startCommand()
closeRenameAndReopen()
closeAndRename()
DumpGZipOutput:: (1 method):
__construct()
DumpBZip2Output:: (1 method):
__construct()
Dump7ZipOutput:: (3 methods):
__construct()
setup7zCommand()
closeAndRename()
DumpFilter:: (11 methods):
__construct()
writeOpenStream()
writeCloseStream()
writeOpenPage()
writeClosePage()
writeRevision()
writeLogItem()
closeRenameAndReopen()
closeAndRename()
getFilenames()
pass()
DumpNotalkFilter:: (1 method):
pass()
DumpNamespaceFilter:: (2 methods):
__construct()
pass()
DumpLatestFilter:: (3 methods):
writeOpenPage()
writeClosePage()
writeRevision()
DumpMultiWriter:: (9 methods):
__construct()
writeOpenStream()
writeCloseStream()
writeOpenPage()
writeClosePage()
writeRevision()
closeRenameAndReopen()
closeAndRename()
getFilenames()
Class: WikiExporter - X-Ref
schemaVersion() X-Ref |
Returns the export schema version. return: string |
__construct( $db, $history = WikiExporter::CURRENT,$buffer = WikiExporter::BUFFER, $text = WikiExporter::TEXT ) X-Ref |
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. param: DatabaseBase $db param: int|array $history One of WikiExporter::FULL, WikiExporter::CURRENT, param: int $buffer One of WikiExporter::BUFFER or WikiExporter::STREAM param: int $text One of WikiExporter::TEXT or WikiExporter::STUB |
setOutputSink( &$sink ) X-Ref |
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. param: DumpOutput $sink |
openStream() X-Ref |
No description |
closeStream() X-Ref |
No description |
allPages() X-Ref |
Dumps a series of page and revision records for all pages in the database, either including complete history or only the most recent version. |
pagesByRange( $start, $end ) X-Ref |
Dumps a series of page and revision records for those pages in the database falling within the page_id range given. param: int $start Inclusive lower limit (this id is included) param: int $end Exclusive upper limit (this id is not included) |
revsByRange( $start, $end ) X-Ref |
Dumps a series of page and revision records for those pages in the database with revisions falling within the rev_id range given. param: int $start Inclusive lower limit (this id is included) param: int $end Exclusive upper limit (this id is not included) |
pageByTitle( $title ) X-Ref |
param: Title $title |
pageByName( $name ) X-Ref |
param: string $name |
pagesByName( $names ) X-Ref |
param: array $names |
allLogs() X-Ref |
No description |
logsByRange( $start, $end ) X-Ref |
param: int $start param: int $end |
do_list_authors( $cond ) X-Ref |
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 param: array $cond |
dumpFrom( $cond = '' ) X-Ref |
param: string $cond |
outputPageStream( $resultset ) X-Ref |
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. 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. param: ResultWrapper $resultset |
outputLogStream( $resultset ) X-Ref |
param: ResultWrapper $resultset |
Class: XmlDumpWriter - X-Ref
schemaVersion() X-Ref |
Returns the export schema version. return: string |
openStream() X-Ref |
Opens the XML output stream's root "<mediawiki>" element. This does not include an xml directive, so is safe to include as a subelement in a larger XML stream. Namespace and XML Schema references are included. Output will be encoded in UTF-8. return: string |
siteInfo() X-Ref |
return: string |
sitename() X-Ref |
return: string |
dbname() X-Ref |
return: string |
generator() X-Ref |
return: string |
homelink() X-Ref |
return: string |
caseSetting() X-Ref |
return: string |
namespaces() X-Ref |
return: string |
closeStream() X-Ref |
Closes the output stream with the closing root element. Call when finished dumping things. return: string |
openPage( $row ) X-Ref |
Opens a "<page>" section on the output stream, with data from the given database row. param: object $row return: string |
closePage() X-Ref |
Closes a "<page>" section on the output stream. return: string |
writeRevision( $row ) X-Ref |
Dumps a "<revision>" section on the output stream, with data filled in from the given database row. param: object $row return: string |
writeLogItem( $row ) X-Ref |
Dumps a "<logitem>" section on the output stream, with data filled in from the given database row. param: object $row return: string |
writeTimestamp( $timestamp, $indent = " " ) X-Ref |
param: string $timestamp param: string $indent Default to six spaces return: string |
writeContributor( $id, $text, $indent = " " ) X-Ref |
param: int $id param: string $text param: string $indent Default to six spaces return: string |
writeUploads( $row, $dumpContents = false ) X-Ref |
Warning! This data is potentially inconsistent. :( param: object $row param: bool $dumpContents return: string |
writeUpload( $file, $dumpContents = false ) X-Ref |
param: File $file param: bool $dumpContents return: string |
canonicalTitle( Title $title ) X-Ref |
Return prefixed text form of title, but using the content language's canonical namespace. This skips any special-casing such as gendered user namespaces -- which while useful, are not yet listed in the XML "<siteinfo>" data so are unsafe in export. param: Title $title return: string |
Class: DumpOutput - X-Ref
Base class for output stream; prints to stdout or buffer or wherever.writeOpenStream( $string ) X-Ref |
param: string $string |
writeCloseStream( $string ) X-Ref |
param: string $string |
writeOpenPage( $page, $string ) X-Ref |
param: object $page param: string $string |
writeClosePage( $string ) X-Ref |
param: string $string |
writeRevision( $rev, $string ) X-Ref |
param: object $rev param: string $string |
writeLogItem( $rev, $string ) X-Ref |
param: object $rev param: string $string |
write( $string ) X-Ref |
Override to write to a different stream type. param: string $string return: bool |
closeRenameAndReopen( $newname ) X-Ref |
Close the old file, move it to a specified name, and reopen new file with the old name. Use this for writing out a file in multiple pieces at specified checkpoints (e.g. every n hours). param: string|array $newname File name. May be a string or an array with one element |
closeAndRename( $newname, $open = false ) X-Ref |
Close the old file, and move it to a specified name. Use this for the last piece of a file written out at specified checkpoints (e.g. every n hours). param: string|array $newname File name. May be a string or an array with one element param: bool $open If true, a new file with the old filename will be opened |
getFilenames() X-Ref |
Returns the name of the file or files which are being written to, if there are any. return: null |
Class: DumpFileOutput - X-Ref
Stream outputter to send data to a file.__construct( $file ) X-Ref |
param: string $file |
writeCloseStream( $string ) X-Ref |
param: string $string |
write( $string ) X-Ref |
param: string $string |
closeRenameAndReopen( $newname ) X-Ref |
param: string $newname |
renameOrException( $newname ) X-Ref |
param: string $newname |
checkRenameArgCount( $newname ) X-Ref |
param: array $newname return: string |
closeAndRename( $newname, $open = false ) X-Ref |
param: string $newname param: bool $open |
getFilenames() X-Ref |
return: string|null |
Class: DumpPipeOutput - X-Ref
Stream outputter to send data to a file via some filter program.__construct( $command, $file = null ) X-Ref |
param: string $command param: string $file |
writeCloseStream( $string ) X-Ref |
param: string $string |
startCommand( $command ) X-Ref |
param: string $command |
closeRenameAndReopen( $newname ) X-Ref |
param: string $newname |
closeAndRename( $newname, $open = false ) X-Ref |
param: string $newname param: bool $open |
Class: DumpGZipOutput - X-Ref
Sends dump output via the gzip compressor.__construct( $file ) X-Ref |
param: string $file |
Class: DumpBZip2Output - X-Ref
Sends dump output via the bgzip2 compressor.__construct( $file ) X-Ref |
param: string $file |
Class: Dump7ZipOutput - X-Ref
Sends dump output via the p7zip compressor.__construct( $file ) X-Ref |
param: string $file |
setup7zCommand( $file ) X-Ref |
param: string $file return: string |
closeAndRename( $newname, $open = false ) X-Ref |
param: string $newname param: bool $open |
Class: DumpFilter - X-Ref
Dump output filter class.__construct( &$sink ) X-Ref |
param: DumpOutput $sink |
writeOpenStream( $string ) X-Ref |
param: string $string |
writeCloseStream( $string ) X-Ref |
param: string $string |
writeOpenPage( $page, $string ) X-Ref |
param: object $page param: string $string |
writeClosePage( $string ) X-Ref |
param: string $string |
writeRevision( $rev, $string ) X-Ref |
param: object $rev param: string $string |
writeLogItem( $rev, $string ) X-Ref |
param: object $rev param: string $string |
closeRenameAndReopen( $newname ) X-Ref |
param: string $newname |
closeAndRename( $newname, $open = false ) X-Ref |
param: string $newname param: bool $open |
getFilenames() X-Ref |
return: array |
pass( $page ) X-Ref |
Override for page-based filter types. param: object $page return: bool |
Class: DumpNamespaceFilter - X-Ref
Dump output filter to include or exclude pages in a given set of namespaces.Class: DumpLatestFilter - X-Ref
Dump output filter to include only the last revision in each page sequence.writeOpenPage( $page, $string ) X-Ref |
param: object $page param: string $string |
writeClosePage( $string ) X-Ref |
param: string $string |
writeRevision( $rev, $string ) X-Ref |
param: object $rev param: string $string |
Class: DumpMultiWriter - X-Ref
Base class for output stream; prints to stdout or buffer or wherever.__construct( $sinks ) X-Ref |
param: array $sinks |
writeOpenStream( $string ) X-Ref |
param: string $string |
writeCloseStream( $string ) X-Ref |
param: string $string |
writeOpenPage( $page, $string ) X-Ref |
param: object $page param: string $string |
writeClosePage( $string ) X-Ref |
param: string $string |
writeRevision( $rev, $string ) X-Ref |
param: object $rev param: string $string |
closeRenameAndReopen( $newnames ) X-Ref |
param: array $newnames |
closeAndRename( $newnames, $open = false ) X-Ref |
param: array $newnames param: bool $open |
getFilenames() X-Ref |
return: array |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |