\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

$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() 

Registers the stream wrapper if needed

stream_open()

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

Parameters

$path
$mode
$options
$opened_path

stream_read()

stream_read(  $count) 

Parameters

$count

stream_write()

stream_write(  $data) 

Parameters

$data

stream_tell()

stream_tell() 

stream_eof()

stream_eof() 

stream_seek()

stream_seek(  $offset,   $whence) 

Parameters

$offset
$whence

stream_cast()

stream_cast(  $cast_as) 

Parameters

$cast_as

stream_stat()

stream_stat() 

url_stat()

url_stat(  $path,   $flags) 

Parameters

$path
$flags