List of all members.
Definition at line 45 of file stringstreamwrapper.php.
Member Function Documentation
Instantiates a StringStreamWrapper.
|string||$string||The string to be wrapped|
Definition at line 123 of file stringstreamwrapper.php.
$context = stream_context_create(array(self::PROTOCOL => array('string' => &$string)));
return fopen(self::PROTOCOL . "://",'r', false, $context);
Indicates if 'end of file' is reached.
Definition at line 111 of file stringstreamwrapper.php.
return ($this->position >= $this->stringlength);
Opens the stream The string to be streamed is passed over the context.
|string||$path||Specifies the URL that was passed to the original function |
|string||$mode||The mode used to open the file, as detailed for fopen() |
|int||$options||Holds additional flags set by the streams API |
|string||$opened_path||If the path is opened successfully, and STREAM_USE_PATH is set in options, opened_path should be set to the full path of the file/resource that was actually opened.|
Definition at line 65 of file stringstreamwrapper.php.
$contextOptions = stream_context_get_options($this->context);
$this->position = 0;
$this->stringstream = $contextOptions[self::PROTOCOL]['string'];
$this->stringlength = strlen($this->stringstream);
ZLog::Write(LOGLEVEL_DEBUG, sprintf("StringStreamWrapper::stream_open(): initialized stream length: %d", $this->stringlength));
Reads from stream.
|int||$len||amount of bytes to be read|
Definition at line 89 of file stringstreamwrapper.php.
$data = substr($this->stringstream, $this->position, $len);
$this->position += strlen($data);
Member Data Documentation
The documentation for this class was generated from the following file: