JBuffer

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.

package

Joomla.Platform

subpackage

Utilities

since

11.1

Methods

stream_eof

Function to test for end of file pointer

stream_eof() : boolean
see \streamWrapper::stream_eof
since

11.1

Response

booleanTrue if the pointer is at the end of the stream

stream_open

Function to open file or url

stream_open(string $path, string $mode, integer $options,  &$opened_path) : boolean
since

11.1

see \streamWrapper::stream_open

Arguments

$path

stringThe URL that was passed

$mode

stringMode used to open the file @see fopen

$options

integerFlags used by the API, may be STREAM_USE_PATH and STREAM_REPORT_ERRORS

$opened_path

Response

boolean

stream_read

Read stream

stream_read(integer $count) : mixed
see \streamWrapper::stream_read
since

11.1

Arguments

$count

integerHow 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(integer $offset, integer $whence) : boolean
see \streamWrapper::stream_seek
since

11.1

Arguments

$offset

integerThe offset in bytes

$whence

integerPosition the offset is added to Options are SEEK_SET, SEEK_CUR, and SEEK_END

Response

booleanTrue if updated

stream_tell

Function to get the current position of the stream

stream_tell() : integer
see \streamWrapper::stream_tell
since

11.1

Response

integer

stream_write

Write stream

stream_write(string $data) : integer
see \streamWrapper::stream_write
since

11.1

Arguments

$data

stringThe data to write to the stream.

Response

integer

Properties

position

Stream position

since

11.1

Type(s)

integer

name

Buffer name

since

11.1

Type(s)

string

_buffers

Buffer hash

since

11.1

Type(s)

array