BufferStreamHandler
class BufferStreamHandler
Generic Buffer stream handler
This class provides a generic buffer stream. It can be used to store/retrieve/manipulate string buffers with the standard PHP filesystem I/O methods.
Properties
int
Since: 1.7.0
|
$position | Stream position |
|
string
Since: 1.7.0
|
$name | Buffer name |
|
array
Since: 3.0.0
|
$buffers | Buffer hash |
Methods
static void
stream_register()
Function to register the stream wrapper
bool
stream_open(string $path, string $mode, int $options, string $openedPath)
Function to open file or url
mixed
stream_read(int $count)
Read stream
int
stream_write(string $data)
Write stream
int
stream_tell()
Function to get the current position of the stream
bool
stream_eof()
Function to test for end of file pointer
bool
stream_seek(int $offset, int $whence)
The read write position updates in response to $offset and $whence
bool
seek_set(int $offset)
Set the position to the offset
bool
seek_cur(int $offset)
Adds the offset to current position
bool
seek_end(int $offset)
Sets the position to the end of the current buffer + offset