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.
| since |
1.7.0 |
|---|---|
| package |
Joomla CMS |
Methods
seek_cur
Adds the offset to current position
seek_cur( offset) :
Arguments
- offset
intThe offset in bytes
Response
bool
seek_end
Sets the position to the end of the current buffer + offset
seek_end( offset) :
Arguments
- offset
intThe offset in bytes
Response
bool
seek_set
Set the position to the offset
seek_set( offset) :
Arguments
- offset
intThe offset in bytes
Response
bool
stream_eof
Function to test for end of file pointer
stream_eof() :
| see | streamWrapper::stream_eof |
|---|---|
| since |
1.7.0 |
Response
boolTrue if the pointer is at the end of the stream
stream_open
Function to open file or url
stream_open( path, mode, options, &openedPath) :
| since |
1.7.0 |
|---|---|
| see | streamWrapper::stream_open |
Arguments
- path
stringThe URL that was passed- mode
stringMode used to open the file @see fopen- options
intFlags used by the API, may be STREAM_USE_PATH and STREAM_REPORT_ERRORS- openedPath
stringFull path of the resource. Used with STREAM_USE_PATH option
Response
bool
stream_read
Read stream
stream_read( count) :
| see | streamWrapper::stream_read |
|---|---|
| since |
1.7.0 |
Arguments
- count
intHow many bytes of data from the current position should be returned.
Response
mixedThe data from the stream up to the specified number of bytes (all data if
the total number of bytes in the stream is less than $count. Null if
the stream is empty.
stream_register
Function to register the stream wrapper
stream_register() :
| since |
3.8.2 |
|---|
Response
void
stream_seek
The read write position updates in response to $offset and $whence
stream_seek( offset, whence) :
| see | streamWrapper::stream_seek |
|---|---|
| since |
1.7.0 |
Arguments
- offset
intThe offset in bytes- whence
intPosition the offset is added to Options are SEEK_SET, SEEK_CUR, and SEEK_END
Response
boolTrue if updated
stream_tell
Function to get the current position of the stream
stream_tell() :
| see | streamWrapper::stream_tell |
|---|---|
| since |
1.7.0 |
Response
int
stream_write
Write stream
stream_write( data) :
| see | streamWrapper::stream_write |
|---|---|
| since |
1.7.0 |
Arguments
- data
stringThe data to write to the stream.
Response
int
Properties
position
Stream position
| since |
1.7.0 |
|---|
Type(s)
int
name
Buffer name
| since |
1.7.0 |
|---|
Type(s)
string
buffers
Buffer hash
| since |
3.0.0 |
|---|
Type(s)
array<string|int, mixed>
registered
Status of registering the wrapper
| since |
3.8.2 |
|---|
Type(s)
bool