MediaWiki master
ImportStreamSource Class Reference

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

Inherits ImportSource.

Collaboration diagram for ImportStreamSource:

Public Member Functions

 __construct ( $handle)
 
 atEnd ()
 
 isSeekable ()
 
 readChunk ()
 
 seek (int $offset)
 

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 36 of file ImportStreamSource.php.

Constructor & Destructor Documentation

◆ __construct()

ImportStreamSource::__construct ( $handle)
Parameters
resource$handle

Definition at line 43 of file ImportStreamSource.php.

Member Function Documentation

◆ atEnd()

ImportStreamSource::atEnd ( )
Returns
bool

Implements ImportSource.

Definition at line 50 of file ImportStreamSource.php.

◆ isSeekable()

ImportStreamSource::isSeekable ( )
Returns
bool

Implements ImportSource.

Definition at line 64 of file ImportStreamSource.php.

◆ newFromFile()

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

Definition at line 80 of file ImportStreamSource.php.

◆ newFromInterwiki()

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 170 of file ImportStreamSource.php.

References $params, and wfAppendQuery().

◆ newFromUpload()

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

Definition at line 94 of file ImportStreamSource.php.

◆ newFromURL()

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

Definition at line 134 of file ImportStreamSource.php.

References wfDebug().

◆ readChunk()

ImportStreamSource::readChunk ( )
Returns
string

Implements ImportSource.

Definition at line 57 of file ImportStreamSource.php.

◆ seek()

ImportStreamSource::seek ( int $offset)
Parameters
int$offset
Returns
int

Implements ImportSource.

Definition at line 72 of file ImportStreamSource.php.


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