MediaWiki  1.28.1
ImportStreamSource Class Reference

Imports a XML dump from a file (either from file upload, files on disk, or HTTP) More...

Inheritance diagram for ImportStreamSource:
Collaboration diagram for ImportStreamSource:

Public Member Functions

 __construct ($handle)
 
 atEnd ()
 
 readChunk ()
 

Static Public Member Functions

static newFromFile ($filename)
 
static newFromInterwiki ($interwiki, $page, $history=false, $templates=false, $pageLinkDepth=0)
 
static newFromUpload ($fieldname="xmlimport")
 
static newFromURL ($url, $method= 'GET')
 

Detailed Description

Imports a XML dump from a file (either from file upload, files on disk, or HTTP)

Definition at line 31 of file ImportStreamSource.php.

Constructor & Destructor Documentation

ImportStreamSource::__construct (   $handle)

Definition at line 32 of file ImportStreamSource.php.

Member Function Documentation

ImportStreamSource::atEnd ( )
Returns
bool

Implements ImportSource.

Definition at line 39 of file ImportStreamSource.php.

static ImportStreamSource::newFromFile (   $filename)
static
Parameters
string$filename
Returns
Status

Definition at line 54 of file ImportStreamSource.php.

References StatusValue\newFatal(), and StatusValue\newGood().

Referenced by newFromUpload(), and ImportLinkCacheIntegrationTest\setUp().

static ImportStreamSource::newFromInterwiki (   $interwiki,
  $page,
  $history = false,
  $templates = false,
  $pageLinkDepth = 0 
)
static
Parameters
string$interwiki
string$page
bool$history
bool$templates
int$pageLinkDepth
Returns
Status

Definition at line 132 of file ImportStreamSource.php.

References $link, $page, $params, Interwiki\fetch(), StatusValue\newFatal(), newFromURL(), and wfAppendQuery().

Referenced by SpecialImport\doImport(), and ApiImport\execute().

static ImportStreamSource::newFromUpload (   $fieldname = "xmlimport")
static
Parameters
string$fieldname
Returns
Status

Definition at line 68 of file ImportStreamSource.php.

References $fname, StatusValue\newFatal(), and newFromFile().

Referenced by SpecialImport\doImport(), and ApiImport\execute().

static ImportStreamSource::newFromURL (   $url,
  $method = 'GET' 
)
static
Parameters
string$url
string$method
Returns
Status

Definition at line 106 of file ImportStreamSource.php.

References StatusValue\newFatal(), StatusValue\newGood(), Http\request(), and wfDebug().

Referenced by newFromInterwiki().

ImportStreamSource::readChunk ( )
Returns
string

Implements ImportSource.

Definition at line 46 of file ImportStreamSource.php.


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