Trait StreamDecoratorTrait
Stream decorator trait
Direct Known Users
Aws\Crypto\AesDecryptingStream
,
Aws\Crypto\AesEncryptingStream
,
GuzzleHttp\Psr7\MultipartStream
,
GuzzleHttp\Psr7\NoSeekStream
,
Aws\Crypto\AesGcmDecryptingStream
,
Aws\Crypto\AesGcmEncryptingStream
,
Aws\HashingStream
,
GuzzleHttp\Psr7\CachingStream
,
GuzzleHttp\Psr7\DroppingStream
,
GuzzleHttp\Psr7\InflateStream
,
GuzzleHttp\Psr7\LazyOpenStream
,
GuzzleHttp\Psr7\LimitStream
Methods Summary
- __construct ( Psr\Http\Message\StreamInterface $stream )
-
__get ( string $name )
Magic method used to create a new stream if streams are not added in the constructor of a decorator (e.g., LazyOpenStream).
- __toString ( )
- getContents ( )
-
__call ( string $method, array $args )
Allow decorators to implement custom methods
- close ( )
- getMetadata ( $key = null )
- detach ( )
- getSize ( )
- eof ( )
- tell ( )
- isReadable ( )
- isWritable ( )
- isSeekable ( )
- rewind ( )
- seek ( $offset, $whence = SEEK_SET )
- read ( $length )
- write ( $string )
Methods Details
__construct (
Psr\Http\Message\StreamInterface
$stream
)
Parameters
Psr\Http\Message\StreamInterface |
$stream | Stream to decorate |
Psr\Http\Message\StreamInterface
__get (
string
$name
)
Magic method used to create a new stream if streams are not added in the constructor of a decorator (e.g., LazyOpenStream).
Parameters
string | $name | Name of the property (allows "stream" only). |
Returns
Psr\Http\Message\StreamInterface |
__toString ( )
getContents ( )
mixed __call ( string $method, array $args )
Allow decorators to implement custom methods
Parameters
string | $method | Missing method name |
array | $args | Method arguments |
Returns
mixed |