Caution: The documentation you are viewing is
for an older version of Zend Framework.
You can find the documentation of the current version at:
Zend\Mime\Part — Zend Framework 2 2.4.9 documentation
This class represents a single part of a MIME message. It contains the actual content of the message part plus information about its encoding, content type and original filename. It provides a method for generating a string from the stored data. Zend\Mime\Part objects can be added to Zend\Mime\Message to assemble a complete multipart message.
Zend\Mime\Part is instantiated with a string that represents the content of the new part. The type is assumed to be OCTET-STREAM, encoding is 8Bit. After instantiating a Zend\Mime\Part, meta information can be set by accessing its attributes directly:
1 2 3 4 5 6 7 8 9 10
public $type = Zend\Mime\Mime::TYPE_OCTETSTREAM; public $encoding = Zend\Mime\Mime::ENCODING_8BIT; public $id; public $disposition; public $filename; public $description; public $charset; public $boundary; public $location; public $language;
getContent() returns the encoded content of the Zend\Mime\Part as a string using the encoding specified in the attribute $encoding. Valid values are ZendMimeMime::ENCODING_*. Characterset conversions are not performed.
getHeaders() returns the Mime-Headers for the Zend\Mime\Part as generated from the information in the publicly accessible attributes. The attributes of the object need to be set correctly before this method is called.
A Zend\Mime\Part object has the following methods: