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

Application

Methods

seek_cur

Adds the offset to current position

seek_cur(int offset) : bool

Arguments

offset

intThe offset in bytes

Response

bool

seek_end

Sets the position to the end of the current buffer + offset

seek_end(int offset) : bool

Arguments

offset

intThe offset in bytes

Response

bool

seek_set

Set the position to the offset

seek_set(int offset) : bool

Arguments

offset

intThe offset in bytes

Response

bool

stream_eof

Function to test for end of file pointer

stream_eof() : bool
see \Joomla\CMS\Utility\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(string path, string mode, int options, string &openedPath) : bool
since

1.7.0

see \Joomla\CMS\Utility\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(int count) : mixed
see \Joomla\CMS\Utility\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() : void
static
since

3.8.2

stream_seek

The read write position updates in response to $offset and $whence

stream_seek(int offset, int whence) : bool
see \Joomla\CMS\Utility\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() : int
see \Joomla\CMS\Utility\streamWrapper::stream_tell
since

1.7.0

Response

int

stream_write

Write stream

stream_write(string data) : int
see \Joomla\CMS\Utility\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

registered

Status of registering the wrapper

static
since

3.8.2

Type(s)

bool