Horde_Stream_Wrapper_Combine
in package
A stream wrapper that will combine multiple strings/streams into a single stream.
Tags
Table of Contents
Constants
- WRAPPER_NAME = 'horde-stream-wrapper-combine'
Properties
- $context : resource
- Context.
- $_ateof : bool
- Have we reached EOF?
- $_data : array<string|int, mixed>
- Array that holds the various streams.
- $_datapos : int
- The current position in the data array.
- $_length : int
- The combined length of the stream.
- $_position : int
- The current position in the string.
- $_id : int
- Unique ID tracker for the streams.
Methods
- getStream() : resource
- Create a stream from multiple data sources.
- stream_eof() : bool
- stream_open() : mixed
- stream_read() : mixed
- stream_seek() : bool
- stream_stat() : array<string|int, mixed>
- stream_tell() : int
- stream_write() : int
Constants
WRAPPER_NAME
public
mixed
WRAPPER_NAME
= 'horde-stream-wrapper-combine'
Properties
$context
Context.
public
resource
$context
$_ateof
Have we reached EOF?
protected
bool
$_ateof
= \false
$_data
Array that holds the various streams.
protected
array<string|int, mixed>
$_data
= array()
$_datapos
The current position in the data array.
protected
int
$_datapos
= 0
$_length
The combined length of the stream.
protected
int
$_length
= 0
$_position
The current position in the string.
protected
int
$_position
= 0
$_id
Unique ID tracker for the streams.
private
static int
$_id
= 0
Methods
getStream()
Create a stream from multiple data sources.
public
static getStream(array<string|int, mixed> $data) : resource
Parameters
- $data : array<string|int, mixed>
-
An array of strings and/or streams to combine into a single stream.
Tags
Return values
resource —A PHP stream.
stream_eof()
public
stream_eof() : bool
Tags
Return values
boolstream_open()
public
stream_open(string $path, string $mode, int $options, string &$opened_path) : mixed
Parameters
- $path : string
- $mode : string
- $options : int
- $opened_path : string
Tags
stream_read()
public
stream_read(int $count) : mixed
Parameters
- $count : int
Tags
stream_seek()
public
stream_seek(int $offset, int $whence) : bool
Parameters
- $offset : int
- $whence : int
-
SEEK_SET, SEEK_CUR, or SEEK_END
Tags
Return values
boolstream_stat()
public
stream_stat() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>stream_tell()
public
stream_tell() : int
Tags
Return values
intstream_write()
public
stream_write(string $data) : int
Parameters
- $data : string