\GuzzleHttp\Psr7StreamWrapper

Converts Guzzle streams into PHP stream resources.

Summary

Methods
Properties
Constants
getResource()
createStreamContext()
register()
stream_open()
stream_read()
stream_write()
stream_tell()
stream_eof()
stream_seek()
stream_cast()
stream_stat()
url_stat()
$context
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$stream
$mode
N/A

Properties

$context

$context : resource

Type

resource

$stream

$stream : \Psr\Http\Message\StreamInterface

Type

StreamInterface

$mode

$mode : string

Type

string — r, r+, or w

Methods

getResource()

getResource(\Psr\Http\Message\StreamInterface  $stream) : resource

Returns a resource representing the stream.

Parameters

\Psr\Http\Message\StreamInterface $stream

The stream to get a resource for

Throws

\InvalidArgumentException

if stream is not readable or writable

Returns

resource —

createStreamContext()

createStreamContext(\Psr\Http\Message\StreamInterface  $stream) : resource

Creates a stream context that can be used to open a stream as a php stream resource.

Parameters

\Psr\Http\Message\StreamInterface $stream

Returns

resource —

register()

register() : mixed

Registers the stream wrapper if needed

Returns

mixed —

stream_open()

stream_open(mixed  $path, mixed  $mode, mixed  $options, mixed  $opened_path) : mixed

Parameters

mixed $path
mixed $mode
mixed $options
mixed $opened_path

Returns

mixed —

stream_read()

stream_read(mixed  $count) : mixed

Parameters

mixed $count

Returns

mixed —

stream_write()

stream_write(mixed  $data) : mixed

Parameters

mixed $data

Returns

mixed —

stream_tell()

stream_tell() : mixed

Returns

mixed —

stream_eof()

stream_eof() : mixed

Returns

mixed —

stream_seek()

stream_seek(mixed  $offset, mixed  $whence) : mixed

Parameters

mixed $offset
mixed $whence

Returns

mixed —

stream_cast()

stream_cast(mixed  $cast_as) : mixed

Parameters

mixed $cast_as

Returns

mixed —

stream_stat()

stream_stat() : mixed

Returns

mixed —

url_stat()

url_stat(mixed  $path, mixed  $flags) : mixed

Parameters

mixed $path
mixed $flags

Returns

mixed —