Class StreamWrapper
Converts Guzzle streams into PHP stream resources.
Methods Summary
-
static
getResource ( Psr\Http\Message\StreamInterface $stream )
Returns a resource representing the stream.
-
static
createStreamContext ( Psr\Http\Message\StreamInterface $stream )
Creates a stream context that can be used to open a stream as a php stream resource.
-
static
register ( )
Registers the stream wrapper if needed
- stream_open ( $path, $mode, $options, & $opened_path )
- stream_read ( $count )
- stream_write ( $data )
- stream_tell ( )
- stream_eof ( )
- stream_seek ( $offset, $whence )
- stream_cast ( $cast_as )
- stream_stat ( )
- url_stat ( $path, $flags )
Methods Details
static
resource
getResource (
Psr\Http\Message\StreamInterface
$stream
)
Returns a resource representing the stream.
Parameters
Psr\Http\Message\StreamInterface |
$stream | The stream to get a resource for |
Returns
resource |
Exceptions
InvalidArgumentException if stream is not readable or writable |
static
resource
createStreamContext (
Psr\Http\Message\StreamInterface
$stream
)
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 |
static register ( )
Registers the stream wrapper if needed