MediaWiki REL1_39
Dump7ZipOutput Class Reference
Inheritance diagram for Dump7ZipOutput:
Collaboration diagram for Dump7ZipOutput:

Public Member Functions

 __construct ( $file, $cmpLevel=4)
 
 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)

 
- Public Member Functions inherited from DumpPipeOutput
 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

 
 startCommand ( $command)
 
 writeCloseStream ( $string)
 
- Public Member Functions inherited from DumpFileOutput
 __construct ( $file)
 
 getFilenames ()
 
 write ( $string)
 
- Public Member Functions inherited from DumpOutput
 writeClosePage ( $string)
 
 writeLogItem ( $rev, $string)
 
 writeOpenPage ( $page, $string)
 
 writeOpenStream ( $string)
 
 writeRevision ( $rev, $string)
 

Protected Attributes

int $compressionLevel
 
- Protected Attributes inherited from DumpPipeOutput
string $command
 
string null $filename
 
resource false $procOpenResource = false
 
- Protected Attributes inherited from DumpFileOutput
string $filename
 
resource false $handle = false
 

Additional Inherited Members

- Protected Member Functions inherited from DumpFileOutput
 checkRenameArgCount ( $newname)
 
 renameOrException ( $newname)
 

Detailed Description

Definition at line 31 of file Dump7ZipOutput.php.

Constructor & Destructor Documentation

◆ __construct()

Dump7ZipOutput::__construct ( $file,
$cmpLevel = 4 )
Parameters
string$file
int$cmpLevelCompression level passed to 7za command's -mx

Reimplemented from DumpPipeOutput.

Definition at line 41 of file Dump7ZipOutput.php.

References DumpPipeOutput\$command, and $file.

Member Function Documentation

◆ closeAndRename()

Dump7ZipOutput::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 from DumpPipeOutput.

Definition at line 65 of file Dump7ZipOutput.php.

References DumpPipeOutput\$command, DumpFileOutput\checkRenameArgCount(), DumpFileOutput\renameOrException(), and DumpPipeOutput\startCommand().

Member Data Documentation

◆ $compressionLevel

int Dump7ZipOutput::$compressionLevel
protected

Definition at line 35 of file Dump7ZipOutput.php.


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