Open Journal Systems  3.3.0
GuzzleHttp\Psr7\MultipartStream Class Reference
Inheritance diagram for GuzzleHttp\Psr7\MultipartStream:
Psr\Http\Message\StreamInterface

Public Member Functions

 __construct (array $elements=[], $boundary=null)
 
 getBoundary ()
 
 isWritable ()
 
- Public Member Functions inherited from Psr\Http\Message\StreamInterface
 __toString ()
 
 close ()
 
 detach ()
 
 eof ()
 
 getContents ()
 
 getMetadata ($key=null)
 
 getSize ()
 
 isReadable ()
 
 isSeekable ()
 
 read ($length)
 
 rewind ()
 
 seek ($offset, $whence=SEEK_SET)
 
 tell ()
 
 write ($string)
 

Protected Member Functions

 createStream (array $elements)
 

Detailed Description

Stream that when read returns bytes for a streaming multipart or multipart/form-data stream.

Definition at line 10 of file MultipartStream.php.

Constructor & Destructor Documentation

◆ __construct()

GuzzleHttp\Psr7\MultipartStream::__construct ( array  $elements = [],
  $boundary = null 
)
Parameters
array$elementsArray 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$boundaryYou can optionally provide a specific boundary
Exceptions

Definition at line 28 of file MultipartStream.php.

References GuzzleHttp\Psr7\MultipartStream\createStream().

Member Function Documentation

◆ createStream()

GuzzleHttp\Psr7\MultipartStream::createStream ( array  $elements)
protected

Create the aggregate stream that will be used to upload the POST data

Definition at line 65 of file MultipartStream.php.

References GuzzleHttp\Psr7\stream_for().

Referenced by GuzzleHttp\Psr7\MultipartStream\__construct().

◆ getBoundary()

GuzzleHttp\Psr7\MultipartStream::getBoundary ( )

Get the boundary

Returns
string

Definition at line 39 of file MultipartStream.php.

◆ isWritable()

GuzzleHttp\Psr7\MultipartStream::isWritable ( )

Returns whether or not the stream is writable.

Returns
bool

Implements Psr\Http\Message\StreamInterface.

Definition at line 44 of file MultipartStream.php.


The documentation for this class was generated from the following file: