MediaWiki
REL1_40
ImportStringSource.php
Go to the documentation of this file.
1
<?php
34
class
ImportStringSource
implements
ImportSource
{
36
private
$mString;
37
39
private
$mRead =
false
;
40
44
public
function
__construct
( $string ) {
45
$this->mString = $string;
46
}
47
51
public
function
atEnd
() {
52
return
$this->mRead;
53
}
54
58
public
function
readChunk
() {
59
if
( $this->
atEnd
() ) {
60
return
false
;
61
}
62
$this->mRead =
true
;
63
return
$this->mString;
64
}
65
69
public
function
isSeekable
() {
70
return
true
;
71
}
72
77
public
function
seek
(
int
$offset ) {
78
$this->mRead =
false
;
79
return
0;
80
}
81
}
ImportStringSource
Used for importing XML dumps where the content of the dump is in a string.
Definition
ImportStringSource.php:34
ImportStringSource\atEnd
atEnd()
Definition
ImportStringSource.php:51
ImportStringSource\isSeekable
isSeekable()
Definition
ImportStringSource.php:69
ImportStringSource\seek
seek(int $offset)
Definition
ImportStringSource.php:77
ImportStringSource\__construct
__construct( $string)
Definition
ImportStringSource.php:44
ImportStringSource\readChunk
readChunk()
Definition
ImportStringSource.php:58
ImportSource
Source interface for XML import.
Definition
ImportSource.php:32
includes
import
ImportStringSource.php
Generated on Thu Jun 27 2024 14:02:56 for MediaWiki by
1.10.0