public function setFields(array $fields)
    {
        $this->clearFields();

        foreach ($fields as $field) {
            $this->addField($field);
        }

        return $this;
    }
public function setFields(array $fields)
    {
        $this->clearFields();

        foreach ($fields as $field) {
            $this->addField($field);
        }

        return $this;
    }
public function setFields ( array $ fields ) { $ this -> clearFields ( ) ; foreach ( $ fields as $ field ) { $ this -> addField ( $ field ) ; } return $ this ; }
Set the fields for the attachment.

@param array $fields
@return $this
Set the fields for the attachment .