GuzzleHttp\Psr7\MultipartStream::__construct PHP Method

__construct() public method

public __construct ( array $elements = [], string $boundary = null )
$elements array 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.
$boundary string You can optionally provide a specific boundary
    public function __construct(array $elements = [], $boundary = null)
    {
        $this->boundary = $boundary ?: uniqid();
        $this->stream = $this->createStream($elements);
    }