Class JBuffer

Description

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: 11.1

Located in /libraries/joomla/utilities/buffer.php (line 22)


	
			
Variable Summary
 array $buffers
 string $name
 integer $position
Method Summary
 boolean stream_eof ()
 boolean stream_open (string $path, string $mode, integer $options, string &$opened_path)
 mixed stream_read (integer $count)
 boolean stream_seek (integer $offset, integer $whence)
 integer stream_tell ()
 integer stream_write (string $data)
Variables
array $buffers = array() (line 46)

Buffer hash

  • since: 12.1
  • access: public
string $name = null (line 38)

Buffer name

  • since: 11.1
  • access: public
integer $position = 0 (line 30)

Stream position

  • since: 11.1
  • access: public
Methods
stream_eof (line 133)

Function to test for end of file pointer

  • return: True if the pointer is at the end of the stream
  • see: streamWrapper::stream_eof
  • since: 11.1
  • access: public
boolean stream_eof ()
stream_open (line 62)

Function to open file or url

  • see: streamWrapper::stream_open
  • since: 11.1
  • access: public
boolean stream_open (string $path, string $mode, integer $options, string &$opened_path)
  • string $path: The URL that was passed
  • string $mode: Mode used to open the file @see fopen
  • integer $options: Flags used by the API, may be STREAM_USE_PATH and STREAM_REPORT_ERRORS
  • string &$opened_path: Full path of the resource. Used with STREAN_USE_PATH option
stream_read (line 84)

Read stream

  • return: The 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.
  • see: streamWrapper::stream_read
  • since: 11.1
  • access: public
mixed stream_read (integer $count)
  • integer $count: How many bytes of data from the current position should be returned.
stream_seek (line 150)

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

  • return: True if updated
  • see: streamWrapper::stream_seek
  • since: 11.1
  • access: public
boolean stream_seek (integer $offset, integer $whence)
  • integer $offset: The offset in bytes
  • integer $whence: Position the offset is added to Options are SEEK_SET, SEEK_CUR, and SEEK_END
stream_tell (line 120)

Function to get the current position of the stream

  • see: streamWrapper::stream_tell
  • since: 11.1
  • access: public
integer stream_tell ()
stream_write (line 102)

Write stream

  • see: streamWrapper::stream_write
  • since: 11.1
  • access: public
integer stream_write (string $data)
  • string $data: The data to write to the stream.

Documentation generated on Tue, 19 Nov 2013 14:54:47 +0100 by phpDocumentor 1.4.3