Copied!

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

Cloneable Final Instantiable
Methods
public __call ( string $method , array $args )
 

Allow decorators to implement custom methods

  • return mixed
public __construct ( array $elements = [ ] , ? string $boundary = NULL )
 
  • param 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.
  • param string $boundary You can optionally provide a specific boundary
  • throws InvalidArgumentException
public __get ( string $name )
 

Magic method used to create a new stream if streams are not added in
the constructor of a decorator (e.g., LazyOpenStream).

  • return StreamInterface
public __toString () : string
public close () : void
public detach ()
public eof () : bool
public getBoundary () : string
public getContents () : string
public getMetadata ( $key = NULL )
 
  • return mixed
public getSize () : ? int
public isReadable () : bool
public isSeekable () : bool
public isWritable () : bool
public read ( $length ) : string
public rewind () : void
public seek ( $offset , $whence = 0 GuzzleHttp\Psr7\SEEK_SET) : void
public tell () : int
public write ( $string ) : int
Methods
protected createStream ( array $elements = [ ] ) : Psr\Http\Message\StreamInterface
 

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

Properties
private $boundary
 
  • var string
Methods
private addElement ( GuzzleHttp\Psr7\AppendStream $stream , array $element ) : void
private createElement ( string $name , Psr\Http\Message\StreamInterface $stream , ? string $filename , array $headers ) : array
private getHeader ( array $headers , string $key )
private getHeaders ( array $headers ) : string
 

Get the headers needed before transferring the content of a POST file

  • param array $headers
© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration