MediaWiki master
BatchRowUpdate Class Reference
Collaboration diagram for BatchRowUpdate:

Public Member Functions

 __construct (BatchRowIterator $reader, BatchRowWriter $writer, RowUpdateGenerator $generator)
 
 execute ()
 Runs the batch update process.
 
 setOutput (callable $output)
 Accepts a callable which will receive a single parameter containing string status updates.
 

Protected Member Functions

 output ( $text)
 Write out a status update.
 

Protected Attributes

RowUpdateGenerator $generator
 Generates single row updates based on the rows content.
 
callable $output
 Output callback.
 
BatchRowIterator $reader
 Iterator that returns an array of database rows.
 
BatchRowWriter $writer
 Writer capable of pushing row updates to the database.
 

Detailed Description

Definition at line 42 of file BatchRowUpdate.php.

Constructor & Destructor Documentation

◆ __construct()

BatchRowUpdate::__construct ( BatchRowIterator  $reader,
BatchRowWriter  $writer,
RowUpdateGenerator  $generator 
)
Parameters
BatchRowIterator$readerIterator that returns an array of database rows
BatchRowWriter$writerWriter capable of pushing row updates to the database
RowUpdateGenerator$generatorGenerates single row updates based on the rows content

Definition at line 74 of file BatchRowUpdate.php.

References $generator, $reader, $writer, and output().

Member Function Documentation

◆ execute()

BatchRowUpdate::execute ( )

Runs the batch update process.

Definition at line 87 of file BatchRowUpdate.php.

References output().

◆ output()

BatchRowUpdate::output (   $text)
protected

Write out a status update.

Parameters
string$textThe value to print

Definition at line 125 of file BatchRowUpdate.php.

References output().

Referenced by __construct(), execute(), output(), and setOutput().

◆ setOutput()

BatchRowUpdate::setOutput ( callable  $output)

Accepts a callable which will receive a single parameter containing string status updates.

Parameters
callable$outputA callback taking a single string parameter to output

Definition at line 116 of file BatchRowUpdate.php.

References $output, and output().

Member Data Documentation

◆ $generator

RowUpdateGenerator BatchRowUpdate::$generator
protected

Generates single row updates based on the rows content.

Definition at line 59 of file BatchRowUpdate.php.

Referenced by __construct().

◆ $output

callable BatchRowUpdate::$output
protected

Output callback.

Definition at line 64 of file BatchRowUpdate.php.

Referenced by setOutput().

◆ $reader

BatchRowIterator BatchRowUpdate::$reader
protected

Iterator that returns an array of database rows.

Definition at line 47 of file BatchRowUpdate.php.

Referenced by __construct().

◆ $writer

BatchRowWriter BatchRowUpdate::$writer
protected

Writer capable of pushing row updates to the database.

Definition at line 53 of file BatchRowUpdate.php.

Referenced by __construct().


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