Documentation

Horde_Stream_Wrapper_Combine
in package

A stream wrapper that will combine multiple strings/streams into a single stream.

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2009-2017 Horde LLC

license

http://www.horde.org/licenses/bsd BSD

Table of Contents

WRAPPER_NAME  = 'horde-stream-wrapper-combine'
$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.
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 = alse

$_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
since
2.1.0
Return values
resource

A PHP stream.

stream_eof()

public stream_eof() : bool
Tags
see
streamWrapper::stream_eof()
Return values
bool

stream_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
see
streamWrapper::stream_open()
throws
Exception
Return values
mixed

stream_read()

public stream_read(int $count) : mixed
Parameters
$count : int
Tags
see
streamWrapper::stream_read()
Return values
mixed

stream_seek()

public stream_seek(int $offset, int $whence) : bool
Parameters
$offset : int
$whence : int

SEEK_SET, SEEK_CUR, or SEEK_END

Tags
see
streamWrapper::stream_seek()
Return values
bool

stream_stat()

public stream_stat() : array<string|int, mixed>
Tags
see
streamWrapper::stream_stat()
Return values
array<string|int, mixed>

stream_tell()

public stream_tell() : int
Tags
see
streamWrapper::stream_tell()
Return values
int

stream_write()

public stream_write(string $data) : int
Parameters
$data : string
Tags
see
streamWrapper::stream_write()
Return values
int

Search results