A MIME part, in a multipart message.
Methods
Create a new MimePart.
__construct(string $body, string $contentType, string $charset)
Details may be optionally passed into the constructor.
Parameters
$body
string
$contentType
string
$charset
string
Empties it's own contents from the cache.
__destruct()
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::__destruct() |
inherited_from |
\Swift_Mime_MimePart::__destruct() |
Returns a string representation of this object.
__toString() : string
Inherited
see |
\toString() |
inherited_from |
\Swift_Mime_SimpleMimeEntity::__toString() |
inherited_from |
\Swift_Mime_MimePart::__toString() |
Returns
string
Receive notification that the charset has changed on this document, or a
parent document.
charsetChanged(string $charset)
Inherited
inherited_from |
\Swift_Mime_MimePart::charsetChanged() |
Parameters
$charset
string
Receive notification that the encoder of this entity or a parent entity
has changed.
encoderChanged(\Swift_Mime_ContentEncoder $encoder)
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::encoderChanged() |
inherited_from |
\Swift_Mime_MimePart::encoderChanged() |
Parameters
Generate a new Content-ID or Message-ID for this MIME entity.
generateId() : string
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::generateId() |
inherited_from |
\Swift_Mime_MimePart::generateId() |
Returns
string
Get the body of this entity as a string.
getBody() : string
Inherited
Returns NULL if no body has been set.
inherited_from |
\Swift_Mime_SimpleMimeEntity::getBody() |
inherited_from |
\Swift_Mime_MimePart::getBody() |
Returns
string
Get the boundary used to separate children in this entity.
getBoundary() : string
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::getBoundary() |
inherited_from |
\Swift_Mime_MimePart::getBoundary() |
Returns
string
Get the character set of this entity.
getCharset() : string
Inherited
inherited_from |
\Swift_Mime_MimePart::getCharset() |
Returns
string
Get all children added to this entity.
getChildren() : array
Inherited
These are not just the immediate children, but all children.
inherited_from |
\Swift_Mime_SimpleMimeEntity::getChildren() |
inherited_from |
\Swift_Mime_MimePart::getChildren() |
Returns
array
of Swift_Mime_Entity
Get the Content-type of this entity.
getContentType() : string
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::getContentType() |
inherited_from |
\Swift_Mime_MimePart::getContentType() |
Returns
string
Test if delsp is being used for this entity.
getDelSp() : boolean
Inherited
inherited_from |
\Swift_Mime_MimePart::getDelSp() |
Returns
boolean
Get the description of this entity.
getDescription() : string
Inherited
This value comes from the Content-Description header if set.
inherited_from |
\Swift_Mime_SimpleMimeEntity::getDescription() |
inherited_from |
\Swift_Mime_MimePart::getDescription() |
Returns
string
Get the encoder used for the body of this entity.
getEncoder() : \Swift_Mime_ContentEncoder
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::getEncoder() |
inherited_from |
\Swift_Mime_MimePart::getEncoder() |
Returns
Get the CID of this entity.
getId() : string
Inherited
The CID will only be present in headers if a Content-ID header is present.
inherited_from |
\Swift_Mime_SimpleMimeEntity::getId() |
inherited_from |
\Swift_Mime_MimePart::getId() |
Returns
string
Get the maximum line length of the body of this entity.
getMaxLineLength() : int
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::getMaxLineLength() |
inherited_from |
\Swift_Mime_MimePart::getMaxLineLength() |
Returns
int
Get the nesting level of this entity.
getNestingLevel() : int
Inherited
The lower the value, the more outermost the entity will be nested.
Returns
int
Create a new MimePart.
newInstance(string $body, string $contentType, string $charset) : \Swift_Mime_MimePart
Static
Parameters
$body
string
$contentType
string
$charset
string
Returns
Set the body of this entity, either as a string, or as an instance of
{@link Swift_OutputByteStream}.
setBody(mixed $body, string $contentType, string $charset) : \Swift_Mime_SimpleMimeEntity
Inherited
inherited_from |
\Swift_Mime_MimePart::setBody() |
Parameters
$body
mixed
$contentType
string
optional
Returns
Set the boundary used to separate children in this entity.
setBoundary(string $boundary) : \Swift_Mime_SimpleMimeEntity
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::setBoundary() |
inherited_from |
\Swift_Mime_MimePart::setBoundary() |
Parameters
$boundary
string
Exceptions
Returns
Set the character set of this entity.
setCharset(string $charset)
Inherited
inherited_from |
\Swift_Mime_MimePart::setCharset() |
Parameters
$charset
string
Set all children of this entity.
setChildren(array $children, int $compoundLevel) : \Swift_Mime_SimpleMimeEntity
Inherited
This includes grandchildren.
inherited_from |
\Swift_Mime_SimpleMimeEntity::setChildren() |
inherited_from |
\Swift_Mime_MimePart::setChildren() |
Parameters
$children
array
Swiift_Mime_Entity instances
$compoundLevel
int
For internal use only
Returns
Set the Content-type of this entity.
setContentType(string $type) : \Swift_Mime_SimpleMimeEntity
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::setContentType() |
inherited_from |
\Swift_Mime_MimePart::setContentType() |
Parameters
$type
string
Returns
Turn delsp on or off for this entity.
setDelSp(boolean $delsp)
Inherited
inherited_from |
\Swift_Mime_MimePart::setDelSp() |
Parameters
$delsp
boolean
Set the description of this entity.
setDescription(string $description) : \Swift_Mime_SimpleMimeEntity
Inherited
This method sets a value in the Content-ID header.
inherited_from |
\Swift_Mime_SimpleMimeEntity::setDescription() |
inherited_from |
\Swift_Mime_MimePart::setDescription() |
Parameters
$description
string
Returns
Set the encoder used for the body of this entity.
setEncoder(\Swift_Mime_ContentEncoder $encoder) : \Swift_Mime_SimpleMimeEntity
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::setEncoder() |
inherited_from |
\Swift_Mime_MimePart::setEncoder() |
Parameters
Returns
Set the CID of this entity.
setId(string $id) : \Swift_Mime_SimpleMimeEntity
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::setId() |
inherited_from |
\Swift_Mime_MimePart::setId() |
Parameters
$id
string
Returns
Set the maximum line length of lines in this body.
setMaxLineLength(int $length) : \Swift_Mime_SimpleMimeEntity
Inherited
Though not enforced by the library, lines should not exceed 1000 chars.
inherited_from |
\Swift_Mime_SimpleMimeEntity::setMaxLineLength() |
inherited_from |
\Swift_Mime_MimePart::setMaxLineLength() |
Parameters
$length
int
Returns
Write this entire entity to a {@link Swift_InputByteStream}.
toByteStream(\Swift_InputByteStream $is)
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::toByteStream() |
inherited_from |
\Swift_Mime_MimePart::toByteStream() |
Parameters
Get this entire entity as a string.
toString() : string
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::toString() |
inherited_from |
\Swift_Mime_MimePart::toString() |
Returns
string
Empty the KeyCache for this entity.
_clearCache()
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::_clearCache() |
inherited_from |
\Swift_Mime_MimePart::_clearCache() |
Encode charset when charset is not utf-8
_convertString($string)
Inherited
inherited_from |
\Swift_Mime_MimePart::_convertString() |
Parameters
$string
Get the KeyCache used in this entity.
_getCache()
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::_getCache() |
inherited_from |
\Swift_Mime_MimePart::_getCache() |
Get the grammar used for validation.
_getGrammar() : \Swift_Mime_Grammar
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::_getGrammar() |
inherited_from |
\Swift_Mime_MimePart::_getGrammar() |
Returns
Get the name of the header that provides the ID of this entity
_getIdField()
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::_getIdField() |
inherited_from |
\Swift_Mime_MimePart::_getIdField() |
Set the nesting level of this entity
_setNestingLevel($level)
Inherited
inherited_from |
\Swift_Mime_MimePart::_setNestingLevel() |
Parameters
$level
Returns a random Content-ID or Message-ID.
getRandomId() : string
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::getRandomId() |
inherited_from |
\Swift_Mime_MimePart::getRandomId() |
Returns
string
_assertValidBoundary()
_assertValidBoundary($boundary)
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::_assertValidBoundary() |
inherited_from |
\Swift_Mime_MimePart::_assertValidBoundary() |
Parameters
$boundary
Throws an Exception if the id passed does not comply with RFC 2822.
_assertValidId(string $id)
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::_assertValidId() |
inherited_from |
\Swift_Mime_MimePart::_assertValidId() |
Parameters
$id
string
Exceptions
_childSortAlgorithm()
_childSortAlgorithm($a, $b)
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::_childSortAlgorithm() |
inherited_from |
\Swift_Mime_MimePart::_childSortAlgorithm() |
Parameters
$a
$b
_createChild()
_createChild()
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::_createChild() |
inherited_from |
\Swift_Mime_MimePart::_createChild() |
_getCompoundLevel()
_getCompoundLevel($children)
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::_getCompoundLevel() |
inherited_from |
\Swift_Mime_MimePart::_getCompoundLevel() |
Parameters
$children
_getNeededChildLevel()
_getNeededChildLevel($child, $compoundLevel)
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::_getNeededChildLevel() |
inherited_from |
\Swift_Mime_MimePart::_getNeededChildLevel() |
Parameters
$child
$compoundLevel
_notifyCharsetChanged()
_notifyCharsetChanged($charset)
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::_notifyCharsetChanged() |
inherited_from |
\Swift_Mime_MimePart::_notifyCharsetChanged() |
Parameters
$charset
_notifyEncoderChanged()
_notifyEncoderChanged(\Swift_Mime_ContentEncoder $encoder)
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::_notifyEncoderChanged() |
inherited_from |
\Swift_Mime_MimePart::_notifyEncoderChanged() |
Parameters
$encoder
_readStream()
_readStream(\Swift_OutputByteStream $os)
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::_readStream() |
inherited_from |
\Swift_Mime_MimePart::_readStream() |
Parameters
$os
_setEncoding()
_setEncoding($encoding)
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::_setEncoding() |
inherited_from |
\Swift_Mime_MimePart::_setEncoding() |
Parameters
$encoding
_sortChildren()
_sortChildren()
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::_sortChildren() |
inherited_from |
\Swift_Mime_MimePart::_sortChildren() |
Properties
$_userCharset
Inherited
inherited_from |
\Swift_Mime_MimePart::$$_userCharset |
$_userContentType
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::$$_userContentType |
inherited_from |
\Swift_Mime_MimePart::$$_userContentType |
$_userDelSp
Inherited
inherited_from |
\Swift_Mime_MimePart::$$_userDelSp |
$_alternativePartOrder
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::$$_alternativePartOrder |
inherited_from |
\Swift_Mime_MimePart::$$_alternativePartOrder |
$_body
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::$$_body |
inherited_from |
\Swift_Mime_MimePart::$$_body |
$_boundary
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::$$_boundary |
inherited_from |
\Swift_Mime_MimePart::$$_boundary |
$_cache
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::$$_cache |
inherited_from |
\Swift_Mime_MimePart::$$_cache |
$_cacheKey
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::$$_cacheKey |
inherited_from |
\Swift_Mime_MimePart::$$_cacheKey |
$_children
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::$$_children |
inherited_from |
\Swift_Mime_MimePart::$$_children |
$_compositeRanges
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::$$_compositeRanges |
inherited_from |
\Swift_Mime_MimePart::$$_compositeRanges |
$_compoundLevelFilters
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::$$_compoundLevelFilters |
inherited_from |
\Swift_Mime_MimePart::$$_compoundLevelFilters |
$_encoder
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::$$_encoder |
inherited_from |
\Swift_Mime_MimePart::$$_encoder |
$_grammar
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::$$_grammar |
inherited_from |
\Swift_Mime_MimePart::$$_grammar |
$_id
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::$$_id |
inherited_from |
\Swift_Mime_MimePart::$$_id |
$_maxLineLength
Inherited
inherited_from |
\Swift_Mime_SimpleMimeEntity::$$_maxLineLength |
inherited_from |
\Swift_Mime_MimePart::$$_maxLineLength |
$_nestingLevel
Inherited
inherited_from |
\Swift_Mime_MimePart::$$_nestingLevel |
Constants
An entity which nests with the same precedence as a mime part
LEVEL_ALTERNATIVE
Inherited
inherited_from |
\Swift_Mime_MimeEntity::LEVEL_ALTERNATIVE |
inherited_from |
\Swift_Mime_SimpleMimeEntity::LEVEL_ALTERNATIVE |
inherited_from |
\Swift_Mime_MimePart::LEVEL_ALTERNATIVE |
An entity which nests with the same precedence as an attachment
LEVEL_MIXED
Inherited
inherited_from |
\Swift_Mime_MimeEntity::LEVEL_MIXED |
inherited_from |
\Swift_Mime_SimpleMimeEntity::LEVEL_MIXED |
inherited_from |
\Swift_Mime_MimePart::LEVEL_MIXED |
Main message document; there can only be one of these
LEVEL_TOP
Inherited
inherited_from |
\Swift_Mime_MimeEntity::LEVEL_TOP |
inherited_from |
\Swift_Mime_SimpleMimeEntity::LEVEL_TOP |
inherited_from |
\Swift_Mime_MimePart::LEVEL_TOP |