HumHub Documentation (unofficial)

StreamWrapper
in package

Allows turning ResponseInterface instances to PHP streams.

Tags
author

Nicolas Grekas p@tchwork.com

Table of Contents

Properties

$context  : resource|null
$blocking  : mixed
$client  : HttpClientInterface
$content  : resource|string|null
$eof  : mixed
$handle  : resource|null
$offset  : mixed
$response  : ResponseInterface
$timeout  : mixed

Methods

bindHandles()  : void
createResource()  : resource
Creates a PHP stream resource from a ResponseInterface.
getResponse()  : ResponseInterface
stream_cast()  : mixed
stream_eof()  : bool
stream_open()  : bool
stream_read()  : mixed
stream_seek()  : bool
stream_set_option()  : bool
stream_stat()  : array<string|int, mixed>
stream_tell()  : int
__construct()  : mixed

Properties

Methods

bindHandles()

public bindHandles(resource|callable|null &$handle, resource|null &$content) : void
Parameters
$handle : resource|callable|null

The resource handle that should be monitored when stream_select() is used on the created stream

$content : resource|null

The seekable resource where the response body is buffered

stream_cast()

public stream_cast(int $castAs) : mixed
Parameters
$castAs : int

stream_open()

public stream_open(string $path, string $mode, int $options) : bool
Parameters
$path : string
$mode : string
$options : int
Return values
bool

stream_read()

public stream_read(int $count) : mixed
Parameters
$count : int

stream_seek()

public stream_seek(int $offset[, int $whence = SEEK_SET ]) : bool
Parameters
$offset : int
$whence : int = SEEK_SET
Return values
bool

stream_set_option()

public stream_set_option(int $option, int $arg1, int|null $arg2) : bool
Parameters
$option : int
$arg1 : int
$arg2 : int|null
Return values
bool

stream_stat()

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

        
On this page

Search results