Interface Swift_Mime_MimeEntity

ExtendsSwift_Mime_CharsetObserver, Swift_Mime_EncodingObserver
Implemented bySwift_Attachment, Swift_EmbeddedFile, Swift_Image, Swift_Message, Swift_MimePart, Swift_Mime_Attachment, Swift_Mime_EmbeddedFile, Swift_Mime_Message, Swift_Mime_MimePart, Swift_Mime_SimpleMessage, Swift_Mime_SimpleMimeEntity, Swift_SignedMessage

A MIME entity, such as an attachment.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
charsetChanged() Notify this observer that the entity's charset has changed. Swift_Mime_CharsetObserver
encoderChanged() Notify this observer that the observed entity's ContentEncoder has changed. Swift_Mime_EncodingObserver
getBody() Get the body content of this entity as a string. Swift_Mime_MimeEntity
getChildren() Get all children nested inside this entity. Swift_Mime_MimeEntity
getContentType() Get the qualified content-type of this mime entity. Swift_Mime_MimeEntity
getHeaders() Get the collection of Headers in this Mime entity. Swift_Mime_MimeEntity
getId() Returns a unique ID for this entity. Swift_Mime_MimeEntity
getNestingLevel() Get the level at which this entity shall be nested in final document. Swift_Mime_MimeEntity
setBody() Set the body content of this entity as a string. Swift_Mime_MimeEntity
setChildren() Set all children nested inside this entity. Swift_Mime_MimeEntity
toByteStream() Get this entire entity as a ByteStream. Swift_Mime_MimeEntity
toString() Get this entire entity in its string form. Swift_Mime_MimeEntity

Method Details

getBody() public abstract method

Get the body content of this entity as a string.

Returns NULL if no body has been set.

public abstract string|null getBody ( )
getChildren() public abstract method

Get all children nested inside this entity.

These are not just the immediate children, but all children.

public abstract Swift_Mime_MimeEntity[] getChildren ( )
getContentType() public abstract method

Get the qualified content-type of this mime entity.

public abstract string getContentType ( )
getHeaders() public abstract method

Get the collection of Headers in this Mime entity.

public abstract Swift_Mime_HeaderSet getHeaders ( )
getId() public abstract method

Returns a unique ID for this entity.

For most entities this will likely be the Content-ID, though it has no explicit semantic meaning and can be considered an identifier for programming logic purposes.

If a Content-ID header is present, this value SHOULD match the value of the header.

public abstract string getId ( )
getNestingLevel() public abstract method

Get the level at which this entity shall be nested in final document.

The lower the value, the more outermost the entity will be nested.

See also [[LEVEL_TOP,]] LEVEL_MIXED, LEVEL_RELATED, LEVEL_ALTERNATIVE.

public abstract int getNestingLevel ( )
setBody() public abstract method

Set the body content of this entity as a string.

public abstract void setBody ( $body, $contentType null )
$body string
$contentType string

Optional

setChildren() public abstract method

Set all children nested inside this entity.

This includes grandchildren.

public abstract void setChildren ( array $children )
$children Swift_Mime_MimeEntity[]
toByteStream() public abstract method

Get this entire entity as a ByteStream.

public abstract void toByteStream ( Swift_InputByteStream $is )
$is Swift_InputByteStream

To write to

toString() public abstract method

Get this entire entity in its string form.

public abstract string toString ( )