Back to Joomla project (class list)

Class BufferStreamHandler - list of methods

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\CMS\Utility
Copyright: (C) 2007 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Utility/BufferStreamHandler.php
Project: Joomla

Method Summary

public static void
()

Function to register the stream wrapper
Returns
  • void
Since
  • 3.8.2
Show source code of this method: stream_register Source Code

public bool
(mixed $path, mixed $mode, mixed $options, mixed &$openedPath)

Function to open file or url
Parameters
  • string $path The URL that was passed
  • string $mode Mode used to open the file @see fopen
  • int $options Flags used by the API, may be STREAM_USE_PATH and STREAM_REPORT_ERRORS
  • string & $openedPath Full path of the resource. Used with STREAM_USE_PATH option
Returns
  • bool
Since
  • 1.7.0
-
  • \Joomla\CMS\Utility\streamWrapper::stream_open
Show source code of this method: stream_open Source Code

public mixed
(mixed $count)

Read stream
Parameters
  • int $count How many bytes of data from the current position should be returned.
Returns
  • mixed 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.
Since
  • 1.7.0
-
  • \Joomla\CMS\Utility\streamWrapper::stream_read
Show source code of this method: stream_read Source Code

public int
(mixed $data)

Write stream
Parameters
  • string $data The data to write to the stream.
Returns
  • int
Since
  • 1.7.0
-
  • \Joomla\CMS\Utility\streamWrapper::stream_write
Show source code of this method: stream_write Source Code

public int
()

Function to get the current position of the stream
Returns
  • int
Since
  • 1.7.0
-
  • \Joomla\CMS\Utility\streamWrapper::stream_tell
Show source code of this method: stream_tell Source Code

public bool
()

Function to test for end of file pointer
Returns
  • bool True if the pointer is at the end of the stream
Since
  • 1.7.0
-
  • \Joomla\CMS\Utility\streamWrapper::stream_eof
Show source code of this method: stream_eof Source Code

public bool
(mixed $offset, mixed $whence)

The read write position updates in response to $offset and $whence
Parameters
  • int $offset The offset in bytes
  • int $whence Position the offset is added to Options are SEEK_SET, SEEK_CUR, and SEEK_END
Returns
  • bool True if updated
Since
  • 1.7.0
-
  • \Joomla\CMS\Utility\streamWrapper::stream_seek
Show source code of this method: stream_seek Source Code

protected bool
(mixed $offset)

Set the position to the offset
Parameters
  • int $offset The offset in bytes
Returns
  • bool
Show source code of this method: seek_set Source Code

protected bool
(mixed $offset)

Adds the offset to current position
Parameters
  • int $offset The offset in bytes
Returns
  • bool
Show source code of this method: seek_cur Source Code

protected bool
(mixed $offset)

Sets the position to the end of the current buffer + offset
Parameters
  • int $offset The offset in bytes
Returns
  • bool
Show source code of this method: seek_end Source Code

Properties Summary

public int
$position
Stream position
Since
  • 1.7.0
public string
$name
Buffer name
Since
  • 1.7.0
public array
$buffers
Buffer hash
Since
  • 3.0.0
private static bool
$registered
Status of registering the wrapper
Since
  • 3.8.2

Tags Summary

Since
1.7.0