Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 7 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
| ExportProgressFilter | |
0.00% |
0 / 6 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| writeClosePage | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| writeRevision | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * Copyright © 2005 Brooke Vibber <bvibber@wikimedia.org> |
| 4 | * https://www.mediawiki.org/ |
| 5 | * |
| 6 | * @license GPL-2.0-or-later |
| 7 | * @file |
| 8 | */ |
| 9 | |
| 10 | namespace MediaWiki\Export; |
| 11 | |
| 12 | use MediaWiki\Maintenance\BackupDumper; |
| 13 | |
| 14 | /** |
| 15 | * @ingroup Dump |
| 16 | */ |
| 17 | class ExportProgressFilter extends DumpFilter { |
| 18 | /** |
| 19 | * @var BackupDumper |
| 20 | */ |
| 21 | private $progress; |
| 22 | |
| 23 | /** |
| 24 | * @param DumpOutput &$sink |
| 25 | * @param BackupDumper &$progress |
| 26 | */ |
| 27 | public function __construct( &$sink, &$progress ) { |
| 28 | parent::__construct( $sink ); |
| 29 | $this->progress = $progress; |
| 30 | } |
| 31 | |
| 32 | /** @inheritDoc */ |
| 33 | public function writeClosePage( $string ) { |
| 34 | parent::writeClosePage( $string ); |
| 35 | $this->progress->reportPage(); |
| 36 | } |
| 37 | |
| 38 | /** @inheritDoc */ |
| 39 | public function writeRevision( $rev, $string ) { |
| 40 | parent::writeRevision( $rev, $string ); |
| 41 | $this->progress->revCount(); |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | /** @deprecated class alias since 1.46 */ |
| 46 | class_alias( ExportProgressFilter::class, 'ExportProgressFilter' ); |