StreamWrapper
in package
Allows turning ResponseInterface instances to PHP streams.
Tags
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
$context
public
resource|null
$context
$blocking
private
mixed
$blocking
= true
$client
private
HttpClientInterface
$client
$content
private
resource|string|null
$content
$eof
private
mixed
$eof
= false
$handle
private
resource|null
$handle
$offset
private
mixed
$offset
= 0
$response
private
ResponseInterface
$response
$timeout
private
mixed
$timeout
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
createResource()
Creates a PHP stream resource from a ResponseInterface.
public
static createResource(ResponseInterface $response[, HttpClientInterface|null $client = null ]) : resource
Parameters
- $response : ResponseInterface
- $client : HttpClientInterface|null = null
Return values
resourcegetResponse()
public
getResponse() : ResponseInterface
Return values
ResponseInterfacestream_cast()
public
stream_cast(int $castAs) : mixed
Parameters
- $castAs : int
stream_eof()
public
stream_eof() : bool
Return values
boolstream_open()
public
stream_open(string $path, string $mode, int $options) : bool
Parameters
- $path : string
- $mode : string
- $options : int
Return values
boolstream_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
boolstream_set_option()
public
stream_set_option(int $option, int $arg1, int|null $arg2) : bool
Parameters
- $option : int
- $arg1 : int
- $arg2 : int|null
Return values
boolstream_stat()
public
stream_stat() : array<string|int, mixed>
Return values
array<string|int, mixed>stream_tell()
public
stream_tell() : int
Return values
int__construct()
private
__construct() : mixed