ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Stream that when read returns bytes for a streaming multipart or multipart/form-data stream. More...
Public Member Functions | |
__construct (array $elements=[], $boundary=null) | |
getBoundary () | |
Get the boundary. More... | |
isWritable () | |
Returns whether or not the stream is writable. More... | |
Public Member Functions inherited from Psr\Http\Message\StreamInterface | |
__toString () | |
Reads all data from the stream into a string, from the beginning to end. More... | |
close () | |
Closes the stream and any underlying resources. More... | |
detach () | |
Separates any underlying resources from the stream. More... | |
getSize () | |
Get the size of the stream if known. More... | |
tell () | |
Returns the current position of the file read/write pointer. More... | |
eof () | |
Returns true if the stream is at the end of the stream. More... | |
isSeekable () | |
Returns whether or not the stream is seekable. More... | |
seek ($offset, $whence=SEEK_SET) | |
Seek to a position in the stream. More... | |
rewind () | |
Seek to the beginning of the stream. More... | |
write ($string) | |
Write data to the stream. More... | |
isReadable () | |
Returns whether or not the stream is readable. More... | |
read ($length) | |
Read data from the stream. More... | |
getContents () | |
Returns the remaining contents in a string. More... | |
getMetadata ($key=null) | |
Get stream metadata as an associative array or retrieve a specific key. More... | |
Protected Member Functions | |
createStream (array $elements) | |
Create the aggregate stream that will be used to upload the POST data. More... | |
Private Member Functions | |
getHeaders (array $headers) | |
Get the headers needed before transferring the content of a POST file. More... | |
addElement (AppendStream $stream, array $element) | |
createElement ($name, StreamInterface $stream, $filename, array $headers) | |
getHeader (array $headers, $key) | |
Private Attributes | |
$boundary | |
Stream that when read returns bytes for a streaming multipart or multipart/form-data stream.
Definition at line 10 of file MultipartStream.php.
GuzzleHttp\Psr7\MultipartStream::__construct | ( | array | $elements = [] , |
$boundary = null |
|||
) |
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 |
Definition at line 28 of file MultipartStream.php.
References GuzzleHttp\Psr7\MultipartStream\$boundary, and GuzzleHttp\Psr7\MultipartStream\createStream().
|
private |
Definition at line 79 of file MultipartStream.php.
References $key, GuzzleHttp\Psr7\AppendStream\addStream(), GuzzleHttp\Psr7\MultipartStream\createElement(), GuzzleHttp\Psr7\MultipartStream\getHeaders(), and GuzzleHttp\Psr7\stream_for().
Referenced by GuzzleHttp\Psr7\MultipartStream\createStream().
|
private |
Definition at line 111 of file MultipartStream.php.
References $filename, $name, GuzzleHttp\Psr7\$stream, $type, GuzzleHttp\Psr7\MultipartStream\getHeader(), Psr\Http\Message\StreamInterface\getSize(), and GuzzleHttp\Psr7\mimetype_from_filename().
Referenced by GuzzleHttp\Psr7\MultipartStream\addElement().
|
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, GuzzleHttp\Psr7\MultipartStream\addElement(), and GuzzleHttp\Psr7\stream_for().
Referenced by GuzzleHttp\Psr7\MultipartStream\__construct().
GuzzleHttp\Psr7\MultipartStream::getBoundary | ( | ) |
Get the boundary.
Definition at line 39 of file MultipartStream.php.
References GuzzleHttp\Psr7\MultipartStream\$boundary.
|
private |
Definition at line 142 of file MultipartStream.php.
References $key.
Referenced by GuzzleHttp\Psr7\MultipartStream\createElement().
|
private |
Get the headers needed before transferring the content of a POST file.
Definition at line 52 of file MultipartStream.php.
References $key.
Referenced by GuzzleHttp\Psr7\MultipartStream\addElement().
GuzzleHttp\Psr7\MultipartStream::isWritable | ( | ) |
Returns whether or not the stream is writable.
Implements Psr\Http\Message\StreamInterface.
Definition at line 44 of file MultipartStream.php.
|
private |
Definition at line 14 of file MultipartStream.php.
Referenced by GuzzleHttp\Psr7\MultipartStream\__construct(), and GuzzleHttp\Psr7\MultipartStream\getBoundary().