Buffer
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.0 |
|---|---|
| package |
Joomla Framework |
Methods
stream_eof
Function to test for end of file pointer
stream_eof() : bool
| see | streamWrapper::stream_eof |
|---|---|
| since |
1.0 |
Response
boolTrue if the pointer is at the end of the stream
stream_open
Function to open file or url
stream_open(string path, string mode, int options, string &openedPath) : bool
| since |
1.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 STREAN_USE_PATH option
Response
bool
stream_read
Read stream
stream_read(int count) : mixed
| see | streamWrapper::stream_read |
|---|---|
| since |
1.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_seek
The read write position updates in response to $offset and $whence
stream_seek(int offset, int whence) : bool
| see | streamWrapper::stream_seek |
|---|---|
| since |
1.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() : int
| see | streamWrapper::stream_tell |
|---|---|
| since |
1.0 |
Response
int
stream_write
Write stream
stream_write(string data) : int
| see | streamWrapper::stream_write |
|---|---|
| since |
1.0 |
Arguments
- data
stringThe data to write to the stream.
Response
int
Properties
position
Stream position
| since |
1.0 |
|---|
Type(s)
int
name
Buffer name
| since |
1.0 |
|---|
Type(s)
string
buffers
Buffer hash
| since |
1.0 |
|---|
Type(s)
array