MediaWiki
1.32.5
|
Public Member Functions | |
caseSetting () | |
closePage () | |
Closes a "<page>" section on the output stream. More... | |
closeStream () | |
Closes the output stream with the closing root element. More... | |
dbname () | |
generator () | |
homelink () | |
namespaces () | |
openPage ( $row) | |
Opens a "<page>" section on the output stream, with data from the given database row. More... | |
openStream () | |
Opens the XML output stream's root "<mediawiki>" element. More... | |
siteInfo () | |
sitename () | |
writeContributor ( $id, $text, $indent=" ") | |
writeLogItem ( $row) | |
Dumps a "<logitem>" section on the output stream, with data filled in from the given database row. More... | |
writeRevision ( $row) | |
Dumps a "<revision>" section on the output stream, with data filled in from the given database row. More... | |
writeTimestamp ( $timestamp, $indent=" ") | |
writeUpload ( $file, $dumpContents=false) | |
writeUploads ( $row, $dumpContents=false) | |
Warning! This data is potentially inconsistent. More... | |
Static Public Member Functions | |
static | canonicalTitle (Title $title) |
Return prefixed text form of title, but using the content language's canonical namespace. More... | |
Definition at line 31 of file XmlDumpWriter.php.
|
static |
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.
Title | $title |
Definition at line 435 of file XmlDumpWriter.php.
References $title.
XmlDumpWriter::caseSetting | ( | ) |
Definition at line 116 of file XmlDumpWriter.php.
References $wgCapitalLinks, and Xml\element().
Referenced by siteInfo().
XmlDumpWriter::closePage | ( | ) |
Closes a "<page>" section on the output stream.
Definition at line 192 of file XmlDumpWriter.php.
XmlDumpWriter::closeStream | ( | ) |
Closes the output stream with the closing root element.
Call when finished dumping things.
Definition at line 149 of file XmlDumpWriter.php.
XmlDumpWriter::dbname | ( | ) |
Definition at line 93 of file XmlDumpWriter.php.
References $wgDBname, and Xml\element().
Referenced by siteInfo().
XmlDumpWriter::generator | ( | ) |
Definition at line 101 of file XmlDumpWriter.php.
References $wgVersion, and Xml\element().
Referenced by siteInfo().
XmlDumpWriter::homelink | ( | ) |
Definition at line 109 of file XmlDumpWriter.php.
References Xml\element(), and Title\newMainPage().
Referenced by siteInfo().
XmlDumpWriter::namespaces | ( | ) |
Definition at line 126 of file XmlDumpWriter.php.
References $title, as, Xml\element(), and MWNamespace\isCapitalized().
Referenced by siteInfo().
XmlDumpWriter::openPage | ( | $row | ) |
Opens a "<page>" section on the output stream, with data from the given database row.
object | $row |
Definition at line 160 of file XmlDumpWriter.php.
References $out, $title, Xml\element(), Xml\elementClean(), WikiPage\factory(), Title\isValidRedirectTarget(), Title\makeTitle(), and Hooks\run().
XmlDumpWriter::openStream | ( | ) |
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.
Definition at line 42 of file XmlDumpWriter.php.
References Xml\element(), WikiExporter\schemaVersion(), and siteInfo().
XmlDumpWriter::siteInfo | ( | ) |
Definition at line 69 of file XmlDumpWriter.php.
References caseSetting(), dbname(), generator(), homelink(), namespaces(), and sitename().
Referenced by openStream().
XmlDumpWriter::sitename | ( | ) |
Definition at line 85 of file XmlDumpWriter.php.
References $wgSitename, and Xml\element().
Referenced by siteInfo().
XmlDumpWriter::writeContributor | ( | $id, | |
$text, | |||
$indent = " " |
|||
) |
int | $id | |
string | $text | |
string | $indent | Default to six spaces |
Definition at line 349 of file XmlDumpWriter.php.
References $out, Xml\element(), Xml\elementClean(), and IP\isValid().
Referenced by writeLogItem(), writeRevision(), and writeUpload().
XmlDumpWriter::writeLogItem | ( | $row | ) |
Dumps a "<logitem>" section on the output stream, with data filled in from the given database row.
object | $row |
Definition at line 294 of file XmlDumpWriter.php.
References $out, $title, LogPage\DELETED_ACTION, LogPage\DELETED_COMMENT, LogPage\DELETED_USER, Xml\element(), Xml\elementClean(), CommentStore\getStore(), Title\makeTitle(), writeContributor(), and writeTimestamp().
XmlDumpWriter::writeRevision | ( | $row | ) |
Dumps a "<revision>" section on the output stream, with data filled in from the given database row.
object | $row |
Definition at line 204 of file XmlDumpWriter.php.
References $out, $title, Revision\DELETED_COMMENT, Revision\DELETED_TEXT, Revision\DELETED_USER, Xml\element(), Xml\elementClean(), ContentHandler\getDefaultModelFor(), ContentHandler\getForModelID(), Revision\getRevisionText(), CommentStore\getStore(), Title\makeTitle(), Hooks\run(), writeContributor(), and writeTimestamp().
XmlDumpWriter::writeTimestamp | ( | $timestamp, | |
$indent = " " |
|||
) |
string | $timestamp | |
string | $indent | Default to six spaces |
Definition at line 338 of file XmlDumpWriter.php.
References Xml\element(), and wfTimestamp().
Referenced by writeLogItem(), writeRevision(), and writeUpload().
XmlDumpWriter::writeUpload | ( | $file, | |
$dumpContents = false |
|||
) |
File | $file | |
bool | $dumpContents |
Definition at line 387 of file XmlDumpWriter.php.
References File\DELETED_COMMENT, Xml\element(), Xml\elementClean(), writeContributor(), and writeTimestamp().
Referenced by writeUploads().
XmlDumpWriter::writeUploads | ( | $row, | |
$dumpContents = false |
|||
) |
Warning! This data is potentially inconsistent.
:(
object | $row | |
bool | $dumpContents |
Definition at line 367 of file XmlDumpWriter.php.
References $out, as, NS_FILE, wfLocalFile(), and writeUpload().