10 defined(
'JPATH_PLATFORM') or die;
12 jimport('joomla.filesystem.support.stringcontroller');
109 public function stream_open($path, $mode, $options, &$opened_path)
113 if ($this->currentString)
115 $this->len = strlen($this->currentString);
117 $this->stat = $this->url_stat($path, 0);
135 public function stream_stat()
151 public function url_stat($path, $flags = 0)
163 'size' => strlen($string),
168 'blocks' => ceil(strlen($string) / 512));
186 public function stream_read($count)
188 $result = substr($this->currentString, $this->pos, $count);
189 $this->pos += $count;
204 public function stream_write($data)
217 public function stream_tell()
229 public function stream_eof()
231 if ($this->pos > $this->len)
249 public function stream_seek($offset, $whence)
252 if ($offset > $this->len)
261 $this->pos = $offset;
265 if (($this->pos + $offset) < $this->len)
267 $this->pos += $offset;
276 $this->pos = $this->len - $offset;
291 public function stream_flush()
298 stream_wrapper_register(
'string',
'JStreamString') or die('
JStreamString Wrapper Registration Failed');