MediaWiki  master
ImportStringSource.php
Go to the documentation of this file.
1 <?php
34 class ImportStringSource implements ImportSource {
36  private $mString;
37 
39  private $mRead;
40 
44  public function __construct( $string ) {
45  $this->mString = $string;
46  $this->mRead = false;
47  }
48 
52  public function atEnd() {
53  return $this->mRead;
54  }
55 
59  public function readChunk() {
60  if ( $this->atEnd() ) {
61  return false;
62  }
63  $this->mRead = true;
64  return $this->mString;
65  }
66 }
ImportStringSource\atEnd
atEnd()
Definition: ImportStringSource.php:52
ImportStringSource\$mString
string $mString
Definition: ImportStringSource.php:36
ImportStringSource\$mRead
bool $mRead
Definition: ImportStringSource.php:39
ImportStringSource\__construct
__construct( $string)
Definition: ImportStringSource.php:44
ImportStringSource
Used for importing XML dumps where the content of the dump is in a string.
Definition: ImportStringSource.php:34
ImportSource
Source interface for XML import.
Definition: ImportSource.php:32
ImportStringSource\readChunk
readChunk()
Definition: ImportStringSource.php:59