MediaWiki master
ImportStringSource.php
Go to the documentation of this file.
1<?php
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}
Used for importing XML dumps where the content of the dump is in a string.
Source interface for XML import.