Class MultipartStream
- GuzzleHttp\Psr7\MultipartStream implements Psr\Http\Message\StreamInterface uses GuzzleHttp\Psr7\StreamDecoratorTrait
- Namespace: GuzzleHttp\Psr7
- Located at MultipartStream.php
Stream that when read returns bytes for a streaming multipart or multipart/form-data stream.
Methods Summary
- __construct ( array $elements = [], string $boundary = null )
-
getBoundary ( )
Get the boundary
-
isWritable ( )
Returns whether or not the stream is writable.
Methods inherited from Psr\Http\Message\StreamInterface
__toString()
,
close()
,
detach()
,
eof()
,
getContents()
,
getMetadata()
,
getSize()
,
isReadable()
,
isSeekable()
,
read()
,
rewind()
,
seek()
,
tell()
,
write()
Methods used from GuzzleHttp\Psr7\StreamDecoratorTrait
Methods Details
__construct ( array $elements = [], string $boundary = null )
Parameters
array | $elements = [] | Array of associative arrays, each containing a required "name" key mapping to the form field, name, a required "contents" key mapping to a StreamInterface/resource/string, an optional "headers" associative array of custom headers, and an optional "filename" key mapping to a string to send as the filename in the part. |
string | $boundary = null | You can optionally provide a specific boundary |
Exceptions
InvalidArgumentException |
string getBoundary ( )
Get the boundary
Returns
string |
boolean isWritable ( )
Returns whether or not the stream is writable.
Returns
boolean |