MediaWiki
1.34.0
ApiImportReporter.php
Go to the documentation of this file.
1
<?php
27
class
ApiImportReporter
extends
ImportReporter
{
28
private
$mResultArr
= [];
29
39
public
function
reportPage
(
$title
, $foreignTitle, $revisionCount, $successCount, $pageInfo ) {
40
// Add a result entry
41
$r = [];
42
43
if
(
$title
===
null
) {
44
# Invalid or non-importable title
45
$r[
'title'
] = $pageInfo[
'title'
];
46
$r[
'invalid'
] =
true
;
47
}
else
{
48
ApiQueryBase::addTitleInfo
( $r,
$title
);
49
$r[
'revisions'
] = (int)$successCount;
50
}
51
52
$this->mResultArr[] = $r;
53
54
// Piggyback on the parent to do the logging
55
parent::reportPage(
$title
, $foreignTitle, $revisionCount, $successCount, $pageInfo );
56
}
57
58
public
function
getData
() {
59
return
$this->mResultArr
;
60
}
61
}
ApiImportReporter\reportPage
reportPage( $title, $foreignTitle, $revisionCount, $successCount, $pageInfo)
Definition:
ApiImportReporter.php:39
ApiImportReporter\$mResultArr
$mResultArr
Definition:
ApiImportReporter.php:28
ImportReporter
Reporting callback.
Definition:
ImportReporter.php:27
ApiImportReporter\getData
getData()
Definition:
ApiImportReporter.php:58
$title
$title
Definition:
testCompression.php:34
ApiQueryBase\addTitleInfo
static addTitleInfo(&$arr, $title, $prefix='')
Add information (title and namespace) about a Title object to a result array.
Definition:
ApiQueryBase.php:443
ApiImportReporter
Import reporter for the API.
Definition:
ApiImportReporter.php:27
includes
api
ApiImportReporter.php
Generated on Thu Dec 19 2019 14:54:02 for MediaWiki by
1.8.16