MediaWiki REL1_31
ImportableUploadRevisionImporter Class Reference
Inheritance diagram for ImportableUploadRevisionImporter:
Collaboration diagram for ImportableUploadRevisionImporter:

Public Member Functions

 __construct ( $enableUploads, LoggerInterface $logger)
 
 downloadSource (ImportableUploadRevision $wikiRevision)
 
 import (ImportableUploadRevision $importableRevision)
 

Private Member Functions

 newNotOkStatus ()
 

Private Attributes

bool $enableUploads
 
LoggerInterface $logger
 

Detailed Description

Since
1.31

Definition at line 8 of file ImportableUploadRevisionImporter.php.

Constructor & Destructor Documentation

◆ __construct()

ImportableUploadRevisionImporter::__construct ( $enableUploads,
LoggerInterface $logger )
Parameters
bool$enableUploads
LoggerInterface$logger

Definition at line 24 of file ImportableUploadRevisionImporter.php.

References $enableUploads, and $logger.

Member Function Documentation

◆ downloadSource()

ImportableUploadRevisionImporter::downloadSource ( ImportableUploadRevision $wikiRevision)
Deprecated
DO NOT CALL ME. This method was introduced when factoring UploadImporter out of WikiRevision. It only has 1 use by the deprecated downloadSource method in WikiRevision. Do not use this in new code.
Parameters
ImportableUploadRevision$wikiRevision
Returns
bool|string

Definition at line 127 of file ImportableUploadRevisionImporter.php.

References Http\get(), and wfTempDir().

Referenced by import().

◆ import()

ImportableUploadRevisionImporter::import ( ImportableUploadRevision $importableUploadRevision)
Since
1.31
Parameters
ImportableUploadRevision$importableUploadRevision
Returns
StatusValue On success, the value member contains the archive name, or an empty string if it was a new file.

Implements UploadRevisionImporter.

Definition at line 41 of file ImportableUploadRevisionImporter.php.

References $source, downloadSource(), OldLocalFile\newFromArchiveName(), User\newFromName(), newNotOkStatus(), RepoGroup\singleton(), and wfLocalFile().

◆ newNotOkStatus()

ImportableUploadRevisionImporter::newNotOkStatus ( )
private
Returns
StatusValue

Definition at line 35 of file ImportableUploadRevisionImporter.php.

Referenced by import().

Member Data Documentation

◆ $enableUploads

bool ImportableUploadRevisionImporter::$enableUploads
private

Definition at line 18 of file ImportableUploadRevisionImporter.php.

Referenced by __construct().

◆ $logger

LoggerInterface ImportableUploadRevisionImporter::$logger
private

Definition at line 13 of file ImportableUploadRevisionImporter.php.

Referenced by __construct().


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