Interface Swift_Mime_MimeEntity
A MIME entity, such as an attachment.
Public Methods
Method | Description | Defined 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
Get the body content of this entity as a string.
Returns NULL if no body has been set.
public abstract string|null getBody ( ) |
Get all children nested inside this entity.
These are not just the immediate children, but all children.
public abstract Swift_Mime_MimeEntity[] getChildren ( ) |
Get the qualified content-type of this mime entity.
public abstract string getContentType ( ) |
Get the collection of Headers in this Mime entity.
public abstract Swift_Mime_HeaderSet getHeaders ( ) |
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 ( ) |
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 ( ) |
Set the body content of this entity as a string.
public abstract void setBody ( $body, $contentType = null ) | ||
$body | string | |
$contentType | string | Optional |
Set all children nested inside this entity.
This includes grandchildren.
public abstract void setChildren ( array $children ) | ||
$children | Swift_Mime_MimeEntity[] |
Get this entire entity as a ByteStream.
public abstract void toByteStream ( Swift_InputByteStream $is ) | ||
$is | Swift_InputByteStream | To write to |
Get this entire entity in its string form.
public abstract string toString ( ) |