MediaWiki
master
ImportStringSource.php
Go to the documentation of this file.
1
<?php
20
class
ImportStringSource
implements
ImportSource
{
22
private
$mString;
23
25
private
$mRead =
false
;
26
30
public
function
__construct
( $string ) {
31
$this->mString = $string;
32
}
33
37
public
function
atEnd
() {
38
return
$this->mRead;
39
}
40
44
public
function
readChunk
() {
45
if
( $this->
atEnd
() ) {
46
return
false
;
47
}
48
$this->mRead =
true
;
49
return
$this->mString;
50
}
51
55
public
function
isSeekable
() {
56
return
true
;
57
}
58
63
public
function
seek
(
int
$offset ) {
64
$this->mRead =
false
;
65
return
0;
66
}
67
}
ImportStringSource
Used for importing XML dumps where the content of the dump is in a string.
Definition
ImportStringSource.php:20
ImportStringSource\atEnd
atEnd()
Definition
ImportStringSource.php:37
ImportStringSource\isSeekable
isSeekable()
Definition
ImportStringSource.php:55
ImportStringSource\seek
seek(int $offset)
Definition
ImportStringSource.php:63
ImportStringSource\__construct
__construct( $string)
Definition
ImportStringSource.php:30
ImportStringSource\readChunk
readChunk()
Definition
ImportStringSource.php:44
ImportSource
Source interface for XML import.
Definition
ImportSource.php:18
includes
Import
ImportStringSource.php
Generated on Fri Dec 12 2025 08:24:56 for MediaWiki by
1.10.0