Introduction to Zend Framework

 Learning Zend Framework


 Zend Framework Reference

  •  Zend_Gdata
  •  Zend_Http
  •  Zend_InfoCard
  •  Zend_Json
  •  Zend_Layout
  •  Zend_Ldap
  •  Zend_Loader
  •  Zend_Locale
  •  Zend_Log
  •  Zend_Mail
  •  Zend_Markup
  •  Zend_Measure
  •  Zend_Memory
  •  Zend_Mime
  •  Zend_Navigation
  •  Zend_Oauth
  •  Zend_OpenId
  •  Zend_Paginator
  •  Zend_Pdf
  •  Zend_ProgressBar
  •  Zend_Queue
  •  Zend_Reflection
  •  Zend_Registry
  •  Zend_Rest

  •  Zend_Search_Lucene
  •  Zend_Serializer
  •  Zend_Server
  •  Zend_Service
  •  Zend_Session
  •  Zend_Soap
  •  Zend_Tag
  •  Zend_Test
  •  Zend_Text
  •  Zend_TimeSync
  •  Zend_Tool
  •  Zend_Tool_Framework
  •  Zend_Tool_Project
  •  Zend_Translate
  •  Zend_Uri
  •  Zend_Validate
  •  Zend_Version
  •  Zend_View
  •  Zend_Wildfire
  •  Zend_XmlRpc
  • ZendX_Console_Process_Unix
  • ZendX_JQuery
  • Update 2011-11-16 - Revision 24438 - Version ZF 1.11.x

    49.3. Zend_Mime_Part

    49.3.1. Introduction

    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.

    49.3.2. Instantiation

    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:

    public $type Zend_Mime::TYPE_OCTETSTREAM;
    $encoding Zend_Mime::ENCODING_8BIT;

    49.3.3. Methods for rendering the message part to a string

    getContent() returns the encoded content of the MimePart as a string using the encoding specified in the attribute $encoding. Valid values are Zend_Mime::ENCODING_* Characterset conversions are not performed.

    getHeaders() returns the Mime-Headers for the MimePart 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.

    • $charset has to be set to the actual charset of the content if it is a text type (Text or HTML).

    • $id may be set to identify a content-id for inline images in a HTML mail.

    • $filename contains the name the file will get when downloading it.

    • $disposition defines if the file should be treated as an attachment or if it is used inside the (HTML-) mail (inline).

    • $description is only used for informational purposes.

    • $boundary defines string as boundary.

    • $location can be used as resource URI that has relation to the content.

    • $language defines languages in the content.

    digg delicious meneame google twitter technorati facebook