public function MultipartStream::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/psr7/src/MultipartStream.php \GuzzleHttp\Psr7\MultipartStream::__construct()
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 You can optionally provide a specific boundary:
Throws
\InvalidArgumentException
Overrides StreamDecoratorTrait::__construct
File
- vendor/
guzzlehttp/ psr7/ src/ MultipartStream.php, line 28
Class
- MultipartStream
- Stream that when read returns bytes for a streaming multipart or multipart/form-data stream.
Namespace
GuzzleHttp\Psr7Code
public function __construct(array $elements = [], $boundary = null) {
$this->boundary = $boundary ?: uniqid();
$this->stream = $this
->createStream($elements);
}