protected $output;
/**
- * @param BatchRowIterator $reader Iterator that returns an
+ * @param BatchRowIterator $reader Iterator that returns an
* array of database rows
- * @param BatchRowWriter $writer Writer capable of pushing
+ * @param BatchRowWriter $writer Writer capable of pushing
* row updates to the database
* @param RowUpdateGenerator $generator Generates single row updates
* based on the rows content
$this->reader = $reader;
$this->writer = $writer;
$this->generator = $generator;
- $this->output = function() {
+ $this->output = function () {
}; // nop
}
*
* @param callable $output A callback taking a single string
* parameter to output
- *
- * @throws MWException
*/
- public function setOutput( $output ) {
- if ( !is_callable( $output ) ) {
- throw new MWException(
- 'Provided $output param is required to be callable.'
- );
- }
+ public function setOutput( callable $output ) {
$this->output = $output;
}