MediaWiki master
MediaWiki\Import\ImportStringSource Class Reference

Used for importing XML dumps where the content of the dump is in a string. More...

Inherits MediaWiki\Import\ImportSource.

Collaboration diagram for MediaWiki\Import\ImportStringSource:

Public Member Functions

 __construct (private readonly string $string,)
 
 atEnd ()
 
 isSeekable ()
 
 readChunk ()
 
 seek (int $offset)
 

Detailed Description

Used for importing XML dumps where the content of the dump is in a string.

This class is inefficient, and should only be used for small dumps. For larger dumps, ImportStreamSource should be used instead.

Definition at line 22 of file ImportStringSource.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Import\ImportStringSource::__construct ( private readonly string $string)

Definition at line 25 of file ImportStringSource.php.

Member Function Documentation

◆ atEnd()

MediaWiki\Import\ImportStringSource::atEnd ( )
Returns
bool

Implements MediaWiki\Import\ImportSource.

Definition at line 33 of file ImportStringSource.php.

Referenced by MediaWiki\Import\ImportStringSource\readChunk().

◆ isSeekable()

MediaWiki\Import\ImportStringSource::isSeekable ( )
Returns
bool

Implements MediaWiki\Import\ImportSource.

Definition at line 51 of file ImportStringSource.php.

◆ readChunk()

MediaWiki\Import\ImportStringSource::readChunk ( )
Returns
bool|string

Implements MediaWiki\Import\ImportSource.

Definition at line 40 of file ImportStringSource.php.

References MediaWiki\Import\ImportStringSource\atEnd().

◆ seek()

MediaWiki\Import\ImportStringSource::seek ( int $offset)
Parameters
int$offset
Returns
int

Implements MediaWiki\Import\ImportSource.

Definition at line 59 of file ImportStringSource.php.


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