MediaWiki REL1_34
ApiImportReporter.php
Go to the documentation of this file.
1<?php
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 {
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}
Import reporter for the API.
reportPage( $title, $foreignTitle, $revisionCount, $successCount, $pageInfo)
static addTitleInfo(&$arr, $title, $prefix='')
Add information (title and namespace) about a Title object to a result array.
Reporting callback.