MediaWiki master
MediaWiki\Export\DumpOutput Class Reference

Inherited by MediaWiki\Export\DumpFileOutput, and MediaWiki\Export\DumpStringOutput.

Public Member Functions

 closeAndRename ( $newname, $open=false)
 Close the old file, and move it to a specified name.
 
 closeRenameAndReopen ( $newname)
 Close the old file, move it to a specified name, and reopen new file with the old name.
 
 getFilenames ()
 Returns the name of the file or files which are being written to, if there are any.
 
 write ( $string)
 Override to write to a different stream type.
 
 writeClosePage ( $string)
 
 writeCloseStream ( $string)
 
 writeLogItem ( $rev, $string)
 
 writeOpenPage ( $page, $string)
 
 writeOpenStream ( $string)
 
 writeRevision ( $rev, $string)
 

Detailed Description

Definition at line 17 of file DumpOutput.php.

Member Function Documentation

◆ closeAndRename()

MediaWiki\Export\DumpOutput::closeAndRename ( $newname,
$open = false )

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).

Parameters
string | string[]$newnameFile name. May be a string or an array with one element
bool$openIf true, a new file with the old filename will be opened again for writing (default: false)

Reimplemented in MediaWiki\Export\Dump7ZipOutput, MediaWiki\Export\DumpFileOutput, and MediaWiki\Export\DumpPipeOutput.

Definition at line 90 of file DumpOutput.php.

◆ closeRenameAndReopen()

MediaWiki\Export\DumpOutput::closeRenameAndReopen ( $newname)

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).

Parameters
string | string[]$newnameFile name. May be a string or an array with one element

Reimplemented in MediaWiki\Export\DumpFileOutput, and MediaWiki\Export\DumpPipeOutput.

Definition at line 79 of file DumpOutput.php.

◆ getFilenames()

MediaWiki\Export\DumpOutput::getFilenames ( )

Returns the name of the file or files which are being written to, if there are any.

Returns
null

Reimplemented in MediaWiki\Export\DumpFileOutput.

Definition at line 98 of file DumpOutput.php.

◆ write()

◆ writeClosePage()

MediaWiki\Export\DumpOutput::writeClosePage ( $string)
Parameters
string$string

Definition at line 44 of file DumpOutput.php.

References MediaWiki\Export\DumpOutput\write().

◆ writeCloseStream()

MediaWiki\Export\DumpOutput::writeCloseStream ( $string)
Parameters
string$string

Reimplemented in MediaWiki\Export\DumpFileOutput, and MediaWiki\Export\DumpPipeOutput.

Definition at line 29 of file DumpOutput.php.

References MediaWiki\Export\DumpOutput\write().

◆ writeLogItem()

MediaWiki\Export\DumpOutput::writeLogItem ( $rev,
$string )
Parameters
\\stdClass$rev
string$string

Definition at line 60 of file DumpOutput.php.

References MediaWiki\Export\DumpOutput\write().

◆ writeOpenPage()

MediaWiki\Export\DumpOutput::writeOpenPage ( $page,
$string )
Parameters
\\stdClass | null$page
string$string

Definition at line 37 of file DumpOutput.php.

References MediaWiki\Export\DumpOutput\write().

◆ writeOpenStream()

MediaWiki\Export\DumpOutput::writeOpenStream ( $string)
Parameters
string$string

Definition at line 22 of file DumpOutput.php.

References MediaWiki\Export\DumpOutput\write().

◆ writeRevision()

MediaWiki\Export\DumpOutput::writeRevision ( $rev,
$string )
Parameters
\\stdClass | null$rev
string$string

Definition at line 52 of file DumpOutput.php.

References MediaWiki\Export\DumpOutput\write().


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