* various row objects and XML output for filtering. Filters
* can be chained or used as callbacks.
*
- * @param $sink mixed
+ * @param DumpOutput $sink
*/
public function setOutputSink( &$sink ) {
$this->sink =& $sink;
/**
* Dumps a series of page and revision records for those pages
* in the database falling within the page_id range given.
- * @param int $start inclusive lower limit (this id is included)
+ * @param int $start Inclusive lower limit (this id is included)
* @param int $end Exclusive upper limit (this id is not included)
* If 0, no upper limit.
*/
/**
* Dumps a series of page and revision records for those pages
* in the database with revisions falling within the rev_id range given.
- * @param int $start inclusive lower limit (this id is included)
+ * @param int $start Inclusive lower limit (this id is included)
* @param int $end Exclusive upper limit (this id is not included)
* If 0, no upper limit.
*/
}
/**
- * @param $title Title
+ * @param Title $title
*/
public function pageByTitle( $title ) {
$this->dumpFrom(
}
/**
- * @param $name string
+ * @param string $name
* @throws MWException
*/
public function pageByName( $name ) {
}
/**
- * @param $names array
+ * @param array $names
*/
public function pagesByName( $names ) {
foreach ( $names as $name ) {
}
/**
- * @param $start int
- * @param $end int
+ * @param int $start
+ * @param int $end
*/
public function logsByRange( $start, $end ) {
$condition = 'log_id >= ' . intval( $start );
* Not called by default (depends on $this->list_authors)
* Can be set by Special:Export when not exporting whole history
*
- * @param $cond
+ * @param array $cond
*/
protected function do_list_authors( $cond ) {
wfProfileIn( __METHOD__ );
}
/**
- * @param $cond string
+ * @param string $cond
* @throws MWException
* @throws Exception
*/
* separate database connection not managed by LoadBalancer; some
* blob storage types will make queries to pull source data.
*
- * @param $resultset ResultWrapper
+ * @param ResultWrapper $resultset
*/
protected function outputPageStream( $resultset ) {
$last = null;
}
/**
- * @param $resultset array
+ * @param array $resultset
*/
protected function outputLogStream( $resultset ) {
foreach ( $resultset as $row ) {
* Opens a "<page>" section on the output stream, with data
* from the given database row.
*
- * @param $row object
+ * @param object $row
* @return string
*/
public function openPage( $row ) {
* Dumps a "<revision>" section on the output stream, with
* data filled in from the given database row.
*
- * @param $row object
+ * @param object $row
* @return string
* @access private
*/
* Dumps a "<logitem>" section on the output stream, with
* data filled in from the given database row.
*
- * @param $row object
+ * @param object $row
* @return string
* @access private
*/
}
/**
- * @param $timestamp string
+ * @param string $timestamp
* @param string $indent Default to six spaces
* @return string
*/
}
/**
- * @param $id
- * @param $text string
+ * @param int $id
+ * @param string $text
* @param string $indent Default to six spaces
* @return string
*/
/**
* Warning! This data is potentially inconsistent. :(
- * @param $row
- * @param $dumpContents bool
+ * @param object $row
+ * @param bool $dumpContents
* @return string
*/
function writeUploads( $row, $dumpContents = false ) {
/**
* @param File $file
- * @param $dumpContents bool
+ * @param bool $dumpContents
* @return string
*/
function writeUpload( $file, $dumpContents = false ) {
class DumpOutput {
/**
- * @param $string string
+ * @param string $string
*/
function writeOpenStream( $string ) {
$this->write( $string );
}
/**
- * @param $string string
+ * @param string $string
*/
function writeCloseStream( $string ) {
$this->write( $string );
}
/**
- * @param $page
- * @param $string string
+ * @param object $page
+ * @param string $string
*/
function writeOpenPage( $page, $string ) {
$this->write( $string );
}
/**
- * @param $string string
+ * @param string $string
*/
function writeClosePage( $string ) {
$this->write( $string );
}
/**
- * @param $rev
- * @param $string string
+ * @param object $rev
+ * @param string $string
*/
function writeRevision( $rev, $string ) {
$this->write( $string );
}
/**
- * @param $rev
- * @param $string string
+ * @param object $rev
+ * @param string $string
*/
function writeLogItem( $rev, $string ) {
$this->write( $string );
/**
* Override to write to a different stream type.
- * @param $string string
+ * @param string $string
* @return bool
*/
function write( $string ) {
* 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).
- * @param $newname mixed File name. May be a string or an array with one element
+ * @param string|array $newname File name. May be a string or an array with one element
*/
function closeRenameAndReopen( $newname ) {
}
* 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).
- * @param $newname mixed File name. May be a string or an array with one element
+ * @param string|array $newname File name. May be a string or an array with one element
* @param bool $open If true, a new file with the old filename will be opened
* again for writing (default: false)
*/
protected $handle = false, $filename;
/**
- * @param $file
+ * @param string $file
*/
function __construct( $file ) {
$this->handle = fopen( $file, "wt" );
}
/**
- * @param $string string
+ * @param string $string
*/
function writeCloseStream( $string ) {
parent::writeCloseStream( $string );
}
/**
- * @param $string string
+ * @param string $string
*/
function write( $string ) {
fputs( $this->handle, $string );
}
/**
- * @param $newname
+ * @param string $newname
*/
function closeRenameAndReopen( $newname ) {
$this->closeAndRename( $newname, true );
}
/**
- * @param $newname
+ * @param string $newname
* @throws MWException
*/
function renameOrException( $newname ) {
}
/**
- * @param $newname array
- * @return mixed
+ * @param array $newname
+ * @return string
* @throws MWException
*/
function checkRenameArgCount( $newname ) {
}
/**
- * @param $newname mixed
- * @param $open bool
+ * @param string $newname
+ * @param bool $open
*/
function closeAndRename( $newname, $open = false ) {
$newname = $this->checkRenameArgCount( $newname );
protected $procOpenResource = false;
/**
- * @param $command
- * @param $file null
+ * @param string $command
+ * @param string $file
*/
function __construct( $command, $file = null ) {
if ( !is_null( $file ) ) {
}
/**
- * @param $string string
+ * @param string $string
*/
function writeCloseStream( $string ) {
parent::writeCloseStream( $string );
}
/**
- * @param $command
+ * @param string $command
*/
function startCommand( $command ) {
$spec = array(
}
/**
- * @param mixed $newname
+ * @param string $newname
*/
function closeRenameAndReopen( $newname ) {
$this->closeAndRename( $newname, true );
}
/**
- * @param $newname mixed
- * @param $open bool
+ * @param string $newname
+ * @param bool $open
*/
function closeAndRename( $newname, $open = false ) {
$newname = $this->checkRenameArgCount( $newname );
class DumpGZipOutput extends DumpPipeOutput {
/**
- * @param $file string
+ * @param string $file
*/
function __construct( $file ) {
parent::__construct( "gzip", $file );
class DumpBZip2Output extends DumpPipeOutput {
/**
- * @param $file string
+ * @param string $file
*/
function __construct( $file ) {
parent::__construct( "bzip2", $file );
class Dump7ZipOutput extends DumpPipeOutput {
/**
- * @param $file string
+ * @param string $file
*/
function __construct( $file ) {
$command = $this->setup7zCommand( $file );
}
/**
- * @param $file string
+ * @param string $file
* @return string
*/
function setup7zCommand( $file ) {
}
/**
- * @param $newname string
- * @param $open bool
+ * @param string $newname
+ * @param bool $open
*/
function closeAndRename( $newname, $open = false ) {
$newname = $this->checkRenameArgCount( $newname );
protected $sendingThisPage;
/**
- * @param $sink DumpOutput
+ * @param DumpOutput $sink
*/
function __construct( &$sink ) {
$this->sink =& $sink;
}
/**
- * @param $string string
+ * @param string $string
*/
function writeOpenStream( $string ) {
$this->sink->writeOpenStream( $string );
}
/**
- * @param $string string
+ * @param string $string
*/
function writeCloseStream( $string ) {
$this->sink->writeCloseStream( $string );
}
/**
- * @param $page
- * @param $string string
+ * @param object $page
+ * @param string $string
*/
function writeOpenPage( $page, $string ) {
$this->sendingThisPage = $this->pass( $page, $string );
}
/**
- * @param $string string
+ * @param string $string
*/
function writeClosePage( $string ) {
if ( $this->sendingThisPage ) {
}
/**
- * @param $rev
- * @param $string string
+ * @param object $rev
+ * @param string $string
*/
function writeRevision( $rev, $string ) {
if ( $this->sendingThisPage ) {
}
/**
- * @param $rev
- * @param $string string
+ * @param object $rev
+ * @param string $string
*/
function writeLogItem( $rev, $string ) {
$this->sink->writeRevision( $rev, $string );
}
/**
- * @param $newname string
+ * @param string $newname
*/
function closeRenameAndReopen( $newname ) {
$this->sink->closeRenameAndReopen( $newname );
}
/**
- * @param $newname string
- * @param $open bool
+ * @param string $newname
+ * @param bool $open
*/
function closeAndRename( $newname, $open = false ) {
$this->sink->closeAndRename( $newname, $open );
/**
* Override for page-based filter types.
- * @param $page
+ * @param object $page
* @return bool
*/
function pass( $page ) {
class DumpNotalkFilter extends DumpFilter {
/**
- * @param $page
+ * @param object $page
* @return bool
*/
function pass( $page ) {
var $namespaces = array();
/**
- * @param $sink DumpOutput
- * @param $param
+ * @param DumpOutput $sink
+ * @param array $param
* @throws MWException
*/
function __construct( &$sink, $param ) {
}
/**
- * @param $page
+ * @param object $page
* @return bool
*/
function pass( $page ) {
var $page, $pageString, $rev, $revString;
/**
- * @param $page
- * @param $string string
+ * @param object $page
+ * @param string $string
*/
function writeOpenPage( $page, $string ) {
$this->page = $page;
}
/**
- * @param $string string
+ * @param string $string
*/
function writeClosePage( $string ) {
if ( $this->rev ) {
}
/**
- * @param $rev
- * @param $string string
+ * @param object $rev
+ * @param string $string
*/
function writeRevision( $rev, $string ) {
if ( $rev->rev_id == $this->page->page_latest ) {
class DumpMultiWriter {
/**
- * @param $sinks
+ * @param array $sinks
*/
function __construct( $sinks ) {
$this->sinks = $sinks;
}
/**
- * @param $string string
+ * @param string $string
*/
function writeOpenStream( $string ) {
for ( $i = 0; $i < $this->count; $i++ ) {
}
/**
- * @param $string string
+ * @param string $string
*/
function writeCloseStream( $string ) {
for ( $i = 0; $i < $this->count; $i++ ) {
}
/**
- * @param $page
- * @param $string string
+ * @param object $page
+ * @param string $string
*/
function writeOpenPage( $page, $string ) {
for ( $i = 0; $i < $this->count; $i++ ) {
}
/**
- * @param $string
+ * @param string $string
*/
function writeClosePage( $string ) {
for ( $i = 0; $i < $this->count; $i++ ) {
}
/**
- * @param $rev
- * @param $string
+ * @param object $rev
+ * @param string $string
*/
function writeRevision( $rev, $string ) {
for ( $i = 0; $i < $this->count; $i++ ) {
}
/**
- * @param $newnames
+ * @param array $newnames
*/
function closeRenameAndReopen( $newnames ) {
$this->closeAndRename( $newnames, true );
}
/**
- * @param $newnames array
+ * @param array $newnames
* @param bool $open
*/
function closeAndRename( $newnames, $open = false ) {
}
/**
- * @param $string string
+ * @param string $string
* @return string
*/
function xmlsafe( $string ) {