ResponseBodyResourceStream
in package
implements
ResultStream
Provides a ResultStream from a resource filled by an HTTP response body.
Tags
Table of Contents
Interfaces
- ResultStream
- Stream for a Result.
Properties
- $resource : resource
Methods
- __construct() : mixed
- __toString() : string
- getChunks() : iterable<string|int, string>
- Download the response in chunks.
- getContentAsResource() : resource
- Download content into a resource and then return that resource.
- getContentAsString() : string
- Download content into a temporary resource and return a string.
Properties
$resource
private
resource
$resource
Methods
__construct()
public
__construct(resource $resource) : mixed
Parameters
- $resource : resource
__toString()
public
__toString() : string
Return values
stringgetChunks()
Download the response in chunks.
public
getChunks() : iterable<string|int, string>
Return values
iterable<string|int, string>getContentAsResource()
Download content into a resource and then return that resource.
public
getContentAsResource() : resource
Return values
resourcegetContentAsString()
Download content into a temporary resource and return a string.
public
getContentAsString() : string