42 private $mBuffer =
'';
54 self::$sourceRegistrations[$id] =
$source;
67 $url = parse_url(
$path );
68 if ( !isset( $url[
'host'] ) ) {
73 if ( !isset( self::$sourceRegistrations[$id] ) ) {
77 $this->mSource = self::$sourceRegistrations[$id];
90 while ( !$leave && !$this->mSource->atEnd() &&
91 strlen( $this->mBuffer ) < $count
93 $read = $this->mSource->readChunk();
95 if ( !strlen( $read ) ) {
99 $this->mBuffer .= $read;
102 if ( strlen( $this->mBuffer ) ) {
103 $return = substr( $this->mBuffer, 0, $count );
104 $this->mBuffer = substr( $this->mBuffer, $count );
107 $this->mPosition += strlen( $return );
124 return $this->mPosition;
131 return $this->mSource->atEnd();
140 $result[
'dev'] = $result[0] = 0;
141 $result[
'ino'] = $result[1] = 0;
142 $result[
'mode'] = $result[2] = 0;
143 $result[
'nlink'] = $result[3] = 0;
144 $result[
'uid'] = $result[4] = 0;
145 $result[
'gid'] = $result[5] = 0;
146 $result[
'rdev'] = $result[6] = 0;
147 $result[
'size'] = $result[7] = 0;
148 $result[
'atime'] = $result[8] = 0;
149 $result[
'mtime'] = $result[9] = 0;
150 $result[
'ctime'] = $result[10] = 0;
151 $result[
'blksize'] = $result[11] = 0;
152 $result[
'blocks'] = $result[12] = 0;
wfRandomString( $length=32)
Get a random string containing a number of pseudo-random hex characters.
This is a horrible hack used to keep source compatibility.
resource null $context
Must exists on stream wrapper class.
stream_open( $path, $mode, $options, &$opened_path)
static ImportSource[] $sourceRegistrations
static registerSource(ImportSource $source)
Source interface for XML import.