\Swift_Mime_SimpleMimeEntity
A MIME entity, in a multipart message.
- Author: Chris Corbyn
Synopsis
class Swift_Mime_SimpleMimeEntity
implements
Swift_Mime_MimeEntity
{
- // members
- private $_headers;
- private $_body;
- private $_encoder;
- private $_grammar;
- private $_boundary;
- private array $_compositeRanges;
- private array $_compoundLevelFilters;
- private $_nestingLevel;
- private $_cache;
- private array $_immediateChildren;
- private array $_children;
- private integer $_maxLineLength;
- private array $_alternativePartOrder;
- private $_id;
- private $_cacheKey;
- protected $_userContentType;
- // methods
- public void __construct()
- public string generateId()
- public Swift_Mime_HeaderSet getHeaders()
- public integer getNestingLevel()
- public string getContentType()
- public Swift_Mime_SimpleMimeEntity setContentType()
- public string getId()
- public Swift_Mime_SimpleMimeEntity setId()
- public string getDescription()
- public Swift_Mime_SimpleMimeEntity setDescription()
- public integer getMaxLineLength()
- public Swift_Mime_SimpleMimeEntity setMaxLineLength()
- public array getChildren()
- public Swift_Mime_SimpleMimeEntity setChildren()
- public string getBody()
- public Swift_Mime_SimpleMimeEntity setBody()
- public Swift_Mime_ContentEncoder getEncoder()
- public Swift_Mime_SimpleMimeEntity setEncoder()
- public string getBoundary()
- public Swift_Mime_SimpleMimeEntity setBoundary()
- public void charsetChanged()
- public void encoderChanged()
- public string toString()
- protected string _bodyToString()
- public string __toString()
- public void toByteStream()
- protected void _bodyToByteStream()
- protected void _getIdField()
- protected void _getHeaderFieldModel()
- protected void _setHeaderFieldModel()
- protected void _getHeaderParameter()
- protected void _setHeaderParameter()
- protected void _fixHeaders()
- protected Swift_KeyCache _getCache()
- protected Swift_Mime_Grammar _getGrammar()
- protected void _clearCache()
- protected string getRandomId()
- private void _readStream()
- private void _setEncoding()
- private void _assertValidBoundary()
- private void _setContentTypeInHeaders()
- private void _setNestingLevel()
- private void _getCompoundLevel()
- private void _getNeededChildLevel()
- private void _createChild()
- private void _notifyEncoderChanged()
- private void _notifyCharsetChanged()
- private void _sortChildren()
- private void _childSortAlgorithm()
- public void __destruct()
- private void _assertValidId()
Hierarchy
Extended by
- Swift_MimePart
- Swift_Attachment
- Swift_Image
- Swift_Mime_MimePart
- Swift_Mime_Attachment
- Swift_Mime_SimpleMessage
- Swift_Mime_EmbeddedFile
- Swift_Message
- Swift_SignedMessage
- Swift_EmbeddedFile
Implements
Tasks
Line | Task |
---|---|
283 | Try to refactor this logic |
Constants
Name | Value |
---|---|
LEVEL_TOP | 16 |
LEVEL_MIXED | 256 |
LEVEL_ALTERNATIVE | 4096 |
LEVEL_RELATED | 65536 |
Members
private
-
$_alternativePartOrder
The order in which alternative mime types should appear -
$_body
The body as a string, or a stream -
$_boundary
A mime boundary, if any is used -
$_cache
A KeyCache instance used during encoding and streaming -
$_cacheKey
The key used for accessing the cache -
$_children
All descendants of this entity -
$_compositeRanges
Mime types to be used based on the nesting level -
$_compoundLevelFilters
A set of filter rules to define what level an entity should be nested at -
$_encoder
The encoder that encodes the body into a streamable format -
$_grammar
The grammar to use for id validation -
$_headers
A collection of Headers for this mime entity -
$_id
The CID of this entity -
$_immediateChildren
Direct descendants of this entity -
$_maxLineLength
The maximum line length of the body of this entity -
$_nestingLevel
The nesting level of this entity
protected
- $_userContentType
Methods
private
- _assertValidBoundary()
- _assertValidId() — Throws an Exception if the id passed does not comply with RFC 2822.
- _childSortAlgorithm()
- _createChild()
- _getCompoundLevel()
- _getNeededChildLevel()
- _notifyCharsetChanged()
- _notifyEncoderChanged()
- _readStream()
- _setContentTypeInHeaders()
- _setEncoding()
- _setNestingLevel()
- _sortChildren()
protected
- _bodyToByteStream() — Write this entire entity to a {@link Swift_InputByteStream}.
- _bodyToString() — Get this entire entity as a string.
- _clearCache() — Empty the KeyCache for this entity.
- _fixHeaders() — Re-evaluate what content type and encoding should be used on this entity.
- _getCache() — Get the KeyCache used in this entity.
- _getGrammar() — Get the grammar used for validation.
- _getHeaderFieldModel() — Get the model data (usually an array or a string) for $field.
- _getHeaderParameter() — Get the parameter value of $parameter on $field header.
- _getIdField() — Get the name of the header that provides the ID of this entity
- _setHeaderFieldModel() — Set the model data for $field.
- _setHeaderParameter() — Set the parameter value of $parameter on $field header.
- getRandomId() — Returns a random Content-ID or Message-ID.
public
- __construct() — Create a new SimpleMimeEntity with $headers, $encoder and $cache.
- __destruct() — Empties it's own contents from the cache.
- __toString() — Returns a string representation of this object.
- charsetChanged() — Receive notification that the charset of this entity, or a parent entity has changed.
- encoderChanged() — Receive notification that the encoder of this entity or a parent entity has changed.
- generateId() — Generate a new Content-ID or Message-ID for this MIME entity.
- getBody() — Get the body of this entity as a string.
- getBoundary() — Get the boundary used to separate children in this entity.
- getChildren() — Get all children added to this entity.
- getContentType() — Get the Content-type of this entity.
- getDescription() — Get the description of this entity.
- getEncoder() — Get the encoder used for the body of this entity.
- getHeaders() — Get the {@link Swift_Mime_HeaderSet} for this entity.
- getId() — Get the CID of this entity.
- getMaxLineLength() — Get the maximum line length of the body of this entity.
- getNestingLevel() — Get the nesting level of this entity.
- setBody() — Set the body of this entity, either as a string, or as an instance of {@link Swift_OutputByteStream}.
- setBoundary() — Set the boundary used to separate children in this entity.
- setChildren() — Set all children of this entity.
- setContentType() — Set the Content-type of this entity.
- setDescription() — Set the description of this entity.
- setEncoder() — Set the encoder used for the body of this entity.
- setId() — Set the CID of this entity.
- setMaxLineLength() — Set the maximum line length of lines in this body.
- toByteStream() — Write this entire entity to a {@see Swift_InputByteStream}.
- toString() — Get this entire entity as a string.