private function prepareContent($content)
    {
        $this->content = $content;

        if (!($this->content instanceof StreamInterface)) {
            $this->content = Stream::factory($this->content);
        } elseif ($this->content instanceof MultipartBody) {
            if (!$this->hasHeader('Content-Disposition')) {
                $disposition = 'form-data; name="' . $this->name .'"';
                $this->headers['Content-Disposition'] = $disposition;
            }

            if (!$this->hasHeader('Content-Type')) {
                $this->headers['Content-Type'] = sprintf(
                    "multipart/form-data; boundary=%s",
                    $this->content->getBoundary()
                );
            }
        }
    }
private function prepareContent($content)
    {
        $this->content = $content;

        if (!($this->content instanceof StreamInterface)) {
            $this->content = Stream::factory($this->content);
        } elseif ($this->content instanceof MultipartBody) {
            if (!$this->hasHeader('Content-Disposition')) {
                $disposition = 'form-data; name="' . $this->name .'"';
                $this->headers['Content-Disposition'] = $disposition;
            }

            if (!$this->hasHeader('Content-Type')) {
                $this->headers['Content-Type'] = sprintf(
                    "multipart/form-data; boundary=%s",
                    $this->content->getBoundary()
                );
            }
        }
    }
private function prepareContent ( $ content ) { $ this -> content = $ content ; if ( ! ( $ this -> content instanceof StreamInterface ) ) { $ this -> content = Stream :: factory ( $ this -> content ) ; } elseif ( $ this -> content instanceof MultipartBody ) { if ( ! $ this -> hasHeader ( 'Content-Disposition' ) ) { $ disposition = 'form-data; name="' . $ this -> name . '"' ; $ this -> headers [ 'Content-Disposition' ] = $ disposition ; } if ( ! $ this -> hasHeader ( 'Content-Type' ) ) { $ this -> headers [ 'Content-Type' ] = sprintf ( "multipart/form-data; boundary=%s" , $ this -> content -> getBoundary ( ) ) ; } } }
Prepares the contents of a POST file.

@param mixed $content Content of the POST file
Prepares the contents of a POST file .