MediaWiki  REL1_19
XmlDumpWriter Class Reference

List of all members.

Public Member Functions

 caseSetting ()
 closePage ()
 Closes a <page> section on the output stream.
 closeStream ()
 Closes the output stream with the closing root element.
 generator ()
 homelink ()
 namespaces ()
 openPage ($row)
 Opens a <page> section on the output stream, with data from the given database row.
 openStream ()
 Opens the XML output stream's root <mediawiki> element.
 schemaVersion ()
 Returns the export schema version.
 siteInfo ()
 sitename ()
 writeContributor ($id, $text)
 writeLogItem ($row)
 Dumps a <logitem> section on the output stream, with data filled in from the given database row.
 writeRevision ($row)
 Dumps a <revision> section on the output stream, with data filled in from the given database row.
 writeTimestamp ($timestamp)
 writeUpload ($file, $dumpContents=false)
 writeUploads ($row, $dumpContents=false)
 Warning! This data is potentially inconsistent.

Static Public Member Functions

static canonicalTitle (Title $title)
 Return prefixed text form of title, but using the content language's canonical namespace.

Detailed Description

Definition at line 377 of file Export.php.


Member Function Documentation

static XmlDumpWriter::canonicalTitle ( Title title) [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.

Parameters:
Title$title
Returns:
string
Since:
1.18

Definition at line 697 of file Export.php.

References $wgContLang, Title\getInterwiki(), Title\getNamespace(), Title\getPrefixedText(), and Title\getText().

Here is the call graph for this function:

Definition at line 437 of file Export.php.

References $wgCapitalLinks, and Xml\element().

Referenced by siteInfo().

Here is the call graph for this function:

Here is the caller graph for this function:

Closes a <page> section on the output stream.

Access:
private

Definition at line 511 of file Export.php.

Closes the output stream with the closing root element.

Call when finished dumping things.

Returns:
string

Definition at line 464 of file Export.php.

Definition at line 428 of file Export.php.

References $wgVersion, and Xml\element().

Referenced by siteInfo().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 433 of file Export.php.

References Xml\element(), and Title\newMainPage().

Referenced by siteInfo().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 444 of file Export.php.

References $title, $wgContLang, Xml\element(), and MWNamespace\isCapitalized().

Referenced by siteInfo().

Here is the call graph for this function:

Here is the caller graph for this function:

Opens a <page> section on the output stream, with data from the given database row.

Parameters:
$rowobject
Returns:
string
Access:
private

Definition at line 476 of file Export.php.

References $out, $page, $title, Xml\element(), Xml\elementClean(), WikiPage\factory(), Title\isValidRedirectTarget(), Title\makeTitle(), and wfRunHooks().

Here is the call graph for this function:

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.

Returns:
string

Definition at line 396 of file Export.php.

References $wgLanguageCode, Xml\element(), schemaVersion(), and siteInfo().

Here is the call graph for this function:

Returns the export schema version.

Returns:
string

Definition at line 382 of file Export.php.

Referenced by openStream().

Here is the caller graph for this function:

Definition at line 411 of file Export.php.

References caseSetting(), generator(), homelink(), namespaces(), and sitename().

Referenced by openStream().

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 423 of file Export.php.

References $wgSitename, and Xml\element().

Referenced by siteInfo().

Here is the call graph for this function:

Here is the caller graph for this function:

XmlDumpWriter::writeContributor ( id,
text 
)

Definition at line 622 of file Export.php.

References $out, Xml\element(), Xml\elementClean(), and IP\isValid().

Referenced by writeLogItem(), writeRevision(), and writeUpload().

Here is the call graph for this function:

Here is the caller graph for this function:

Dumps a <logitem> section on the output stream, with data filled in from the given database row.

Parameters:
$rowobject
Returns:
string
Access:
private

Definition at line 578 of file Export.php.

References $out, $title, LogPage\DELETED_ACTION, LogPage\DELETED_COMMENT, LogPage\DELETED_USER, Xml\element(), Xml\elementClean(), Title\makeTitle(), wfProfileIn(), wfProfileOut(), writeContributor(), and writeTimestamp().

Here is the call graph for this function:

Dumps a <revision> section on the output stream, with data filled in from the given database row.

Parameters:
$rowobject
Returns:
string
Access:
private

Definition at line 523 of file Export.php.

References $out, Revision\DELETED_COMMENT, Revision\DELETED_TEXT, Revision\DELETED_USER, Xml\element(), Xml\elementClean(), Revision\getRevisionText(), wfProfileIn(), wfProfileOut(), wfRunHooks(), writeContributor(), and writeTimestamp().

Here is the call graph for this function:

Definition at line 617 of file Export.php.

References Xml\element(), and wfTimestamp().

Referenced by writeLogItem(), writeRevision(), and writeUpload().

Here is the call graph for this function:

Here is the caller graph for this function:

XmlDumpWriter::writeUpload ( file,
dumpContents = false 
)
Parameters:
$fileFile
$dumpContentsbool
Returns:
string

Definition at line 657 of file Export.php.

References $file, Xml\element(), Xml\elementClean(), writeContributor(), and writeTimestamp().

Referenced by writeUploads().

Here is the call graph for this function:

Here is the caller graph for this function:

XmlDumpWriter::writeUploads ( row,
dumpContents = false 
)

Warning! This data is potentially inconsistent.

:(

Definition at line 637 of file Export.php.

References $out, wfLocalFile(), and writeUpload().

Here is the call graph for this function:


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