public function addContent($name, $content, $options = [])
    {
        $multiPartContent = $this->getContent();
        if (!is_array($multiPartContent)) {
            $multiPartContent = [];
        }
        $options['content'] = $content;
        $alias = $this->generateContentAlias($name);
        $this->addAliasToContentMap($name, $alias);
        $multiPartContent[$alias] = $options;
        $this->setContent($multiPartContent);
        return $this;
    }
public function addContent($name, $content, $options = [])
    {
        $multiPartContent = $this->getContent();
        if (!is_array($multiPartContent)) {
            $multiPartContent = [];
        }
        $options['content'] = $content;
        $alias = $this->generateContentAlias($name);
        $this->addAliasToContentMap($name, $alias);
        $multiPartContent[$alias] = $options;
        $this->setContent($multiPartContent);
        return $this;
    }
public function addContent ( $ name , $ content , $ options = [ ] ) { $ multiPartContent = $ this -> getContent ( ) ; if ( ! is_array ( $ multiPartContent ) ) { $ multiPartContent = [ ] ; } $ options [ 'content' ] = $ content ; $ alias = $ this -> generateContentAlias ( $ name ) ; $ this -> addAliasToContentMap ( $ name , $ alias ) ; $ multiPartContent [ $ alias ] = $ options ; $ this -> setContent ( $ multiPartContent ) ; return $ this ; }
Adds a content part for multi-part content request.
@param string $name part (form input) name.
@param string $content content.
@param array $options content part options, valid options are:
- contentType - string, part content type
- fileName - string, name of the uploading file
- mimeType - string, part content type in case of file uploading
@return $this self reference.
Adds a content part for multi - part content request .