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

Methods

stream_eof

Function to test for end of file pointer

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

1.0

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, string &$openedPath) : boolean
since

1.0

see \Joomla\Filesystem\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

$openedPath

stringFull path of the resource. Used with STREAN_USE_PATH option

Response

boolean

stream_read

Read stream

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

1.0

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 \Joomla\Filesystem\streamWrapper::stream_seek
since

1.0

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 \Joomla\Filesystem\streamWrapper::stream_tell
since

1.0

Response

integer

stream_write

Write stream

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

1.0

Arguments

$data

stringThe data to write to the stream.

Response

integer

Properties

position

Stream position

since

1.0

Type(s)

integer

name

Buffer name

since

1.0

Type(s)

string

buffers

Buffer hash

since

1.0

Type(s)

array