MediaWiki  1.34.0
DumpOutput Class Reference
Inheritance diagram for DumpOutput:

Public Member Functions

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

Detailed Description

Definition at line 29 of file DumpOutput.php.

Member Function Documentation

◆ closeAndRename()

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 DumpFileOutput, DumpPipeOutput, and Dump7ZipOutput.

Definition at line 102 of file DumpOutput.php.

◆ closeRenameAndReopen()

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 DumpPipeOutput, and DumpFileOutput.

Definition at line 91 of file DumpOutput.php.

◆ getFilenames()

DumpOutput::getFilenames ( )

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

Returns
null

Reimplemented in DumpFileOutput.

Definition at line 110 of file DumpOutput.php.

◆ write()

DumpOutput::write (   $string)

Override to write to a different stream type.

Parameters
string$string

Reimplemented in DumpFileOutput, and DumpStringOutput.

Definition at line 80 of file DumpOutput.php.

Referenced by writeClosePage(), writeCloseStream(), writeLogItem(), writeOpenPage(), writeOpenStream(), and writeRevision().

◆ writeClosePage()

DumpOutput::writeClosePage (   $string)
Parameters
string$string

Definition at line 56 of file DumpOutput.php.

References write().

◆ writeCloseStream()

DumpOutput::writeCloseStream (   $string)
Parameters
string$string

Reimplemented in DumpPipeOutput, and DumpFileOutput.

Definition at line 41 of file DumpOutput.php.

References write().

◆ writeLogItem()

DumpOutput::writeLogItem (   $rev,
  $string 
)
Parameters
object$rev
string$string

Definition at line 72 of file DumpOutput.php.

References write().

◆ writeOpenPage()

DumpOutput::writeOpenPage (   $page,
  $string 
)
Parameters
object$page
string$string

Definition at line 49 of file DumpOutput.php.

References write().

◆ writeOpenStream()

DumpOutput::writeOpenStream (   $string)
Parameters
string$string

Definition at line 34 of file DumpOutput.php.

References write().

◆ writeRevision()

DumpOutput::writeRevision (   $rev,
  $string 
)
Parameters
object$rev
string$string

Definition at line 64 of file DumpOutput.php.

References write().


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