MediaWiki  master
ImportSource Interface Reference

Source interface for XML import. More...

Inheritance diagram for ImportSource:

Public Member Functions

 atEnd ()
 Indicates whether the end of the input has been reached. More...
 
 isSeekable ()
 Check if the source is seekable and a call to self::seek is valid. More...
 
 readChunk ()
 Return a chunk of the input, as a (possibly empty) string. More...
 
 seek (int $offset)
 Seek the input to the given offset. More...
 

Detailed Description

Source interface for XML import.

Definition at line 32 of file ImportSource.php.

Member Function Documentation

◆ atEnd()

ImportSource::atEnd ( )

Indicates whether the end of the input has been reached.

Will return true after a finite number of calls to readChunk.

Returns
bool true if there is no more input, false otherwise.

Implemented in ImportStringSource, and ImportStreamSource.

◆ isSeekable()

ImportSource::isSeekable ( )

Check if the source is seekable and a call to self::seek is valid.

Returns
bool

Implemented in ImportStringSource, and ImportStreamSource.

◆ readChunk()

ImportSource::readChunk ( )

Return a chunk of the input, as a (possibly empty) string.

When the end of input is reached, readChunk() returns false. If atEnd() returns false, readChunk() will return a string. If atEnd() returns true, readChunk() will return false.

Returns
bool|string

Implemented in ImportStringSource, and ImportStreamSource.

◆ seek()

ImportSource::seek ( int  $offset)

Seek the input to the given offset.

Parameters
int$offset
Returns
int

Implemented in ImportStringSource, and ImportStreamSource.


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