MediaWiki  master
DumpPipeOutput Class Reference
Inheritance diagram for DumpPipeOutput:
Collaboration diagram for DumpPipeOutput:

Public Member Functions

 __construct ( $command, $file=null)
 
 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)
More...
 
 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
More...
 
 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)
 

Public Attributes

 $filename
 

Protected Attributes

 $command
 
resource bool $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 33 of file DumpPipeOutput.php.

Constructor & Destructor Documentation

◆ __construct()

DumpPipeOutput::__construct (   $command,
  $file = null 
)
Parameters
string$command
string | null$file

Reimplemented in Dump7ZipOutput.

Definition at line 42 of file DumpPipeOutput.php.

References $command, $file, and startCommand().

Member Function Documentation

◆ closeAndRename()

DumpPipeOutput::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 DumpFileOutput.

Reimplemented in Dump7ZipOutput.

Definition at line 85 of file DumpPipeOutput.php.

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

Referenced by closeRenameAndReopen().

◆ closeRenameAndReopen()

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

Reimplemented from DumpFileOutput.

Definition at line 78 of file DumpPipeOutput.php.

References closeAndRename().

◆ startCommand()

DumpPipeOutput::startCommand (   $command)
Parameters
string$command

Definition at line 66 of file DumpPipeOutput.php.

References $command.

Referenced by __construct(), Dump7ZipOutput\closeAndRename(), and closeAndRename().

◆ writeCloseStream()

DumpPipeOutput::writeCloseStream (   $string)
Parameters
string$string

Reimplemented from DumpFileOutput.

Definition at line 55 of file DumpPipeOutput.php.

Member Data Documentation

◆ $command

◆ $filename

DumpPipeOutput::$filename

Definition at line 34 of file DumpPipeOutput.php.

◆ $procOpenResource

resource bool DumpPipeOutput::$procOpenResource = false
protected

Definition at line 36 of file DumpPipeOutput.php.


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