MediaWiki  master
ImportReporter Class Reference

Reporting callback. More...

Inheritance diagram for ImportReporter:
Collaboration diagram for ImportReporter:

Public Member Functions

 __construct ( $importer, $upload, $interwiki, $reason=false)
 
 close ()
 
 open ()
 
 reportPage (?PageIdentity $pageIdentity, $foreignTitle, $revisionCount, $successCount, $pageInfo)
 
 setChangeTags (array $tags)
 Sets change tags to apply to the import log entry and null revision. More...
 
- Public Member Functions inherited from ContextSource
 canUseWikiPage ()
 Check whether a WikiPage object can be get with getWikiPage(). More...
 
 exportSession ()
 Export the resolved user IP, HTTP headers, user ID, and session ID. More...
 
 getAuthority ()
 
 getConfig ()
 
 getContext ()
 Get the base IContextSource object. More...
 
 getCsrfTokenSet ()
 Get a repository to obtain and match CSRF tokens. More...
 
 getLanguage ()
 
 getOutput ()
 
 getRequest ()
 
 getSkin ()
 
 getStats ()
 
 getTiming ()
 
 getTitle ()
 
 getUser ()
 
 getWikiPage ()
 Get the WikiPage object. More...
 
 msg ( $key,... $params)
 Get a Message object with context set Parameters are the same as wfMessage() More...
 
 setContext (IContextSource $context)
 

Private Member Functions

 reportLogItem (... $args)
 
 reportNotice ( $msg, array $params)
 

Private Attributes

 $logTags = []
 
 $mInterwiki
 
 $mIsUpload
 
 $mLogItemCount = 0
 
 $mOriginalLogCallback
 
 $mOriginalPageOutCallback
 
 $mPageCount
 
 $reason
 

Detailed Description

Reporting callback.

Definition at line 29 of file ImportReporter.php.

Constructor & Destructor Documentation

◆ __construct()

ImportReporter::__construct (   $importer,
  $upload,
  $interwiki,
  $reason = false 
)
Parameters
WikiImporter$importer
bool$upload
string$interwiki
string | bool$reason

Definition at line 47 of file ImportReporter.php.

References $reason.

Member Function Documentation

◆ close()

ImportReporter::close ( )

◆ open()

ImportReporter::open ( )

Definition at line 69 of file ImportReporter.php.

References ContextSource\getOutput().

◆ reportLogItem()

ImportReporter::reportLogItem (   $args)
private

Definition at line 79 of file ImportReporter.php.

References $args.

◆ reportNotice()

ImportReporter::reportNotice (   $msg,
array  $params 
)
private

Definition at line 73 of file ImportReporter.php.

References Html\element(), ContextSource\getOutput(), and ContextSource\msg().

◆ reportPage()

ImportReporter::reportPage ( ?PageIdentity  $pageIdentity,
  $foreignTitle,
  $revisionCount,
  $successCount,
  $pageInfo 
)
Parameters
?PageIdentity$pageIdentity
ForeignTitle$foreignTitle
int$revisionCount
int$successCount
array$pageInfo
Returns
void

Reimplemented in ApiImportReporter.

Definition at line 94 of file ImportReporter.php.

References $mInterwiki, $reason, $revStore, TitleValue\castPageToLinkTarget(), DB_PRIMARY, ContextSource\getOutput(), ContextSource\getUser(), ContextSource\msg(), CommentStoreComment\newUnsavedComment(), and wfGetDB().

◆ setChangeTags()

ImportReporter::setChangeTags ( array  $tags)

Sets change tags to apply to the import log entry and null revision.

Parameters
string[]$tags
Since
1.29

Definition at line 65 of file ImportReporter.php.

Member Data Documentation

◆ $logTags

ImportReporter::$logTags = []
private

Definition at line 33 of file ImportReporter.php.

◆ $mInterwiki

ImportReporter::$mInterwiki
private

Definition at line 39 of file ImportReporter.php.

Referenced by reportPage().

◆ $mIsUpload

ImportReporter::$mIsUpload
private

Definition at line 38 of file ImportReporter.php.

◆ $mLogItemCount

ImportReporter::$mLogItemCount = 0
private

Definition at line 36 of file ImportReporter.php.

◆ $mOriginalLogCallback

ImportReporter::$mOriginalLogCallback
private

Definition at line 34 of file ImportReporter.php.

◆ $mOriginalPageOutCallback

ImportReporter::$mOriginalPageOutCallback
private

Definition at line 35 of file ImportReporter.php.

◆ $mPageCount

ImportReporter::$mPageCount
private

Definition at line 37 of file ImportReporter.php.

◆ $reason

ImportReporter::$reason
private

Definition at line 32 of file ImportReporter.php.

Referenced by __construct(), and reportPage().


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