XOOPS RMCommon Utilities
2.1.8.91RC
|
Public Member Functions | |
__construct (Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache) | |
__destruct () | |
__toString () | |
charsetChanged ($charset) | |
encoderChanged (Swift_Mime_ContentEncoder $encoder) | |
generateId () | |
getBody () | |
getBoundary () | |
getChildren () | |
getContentType () | |
getDescription () | |
getEncoder () | |
getHeaders () | |
getId () | |
getMaxLineLength () | |
getNestingLevel () | |
setBody ($body, $contentType=null) | |
setBoundary ($boundary) | |
setChildren (array $children, $compoundLevel=null) | |
setContentType ($type) | |
setDescription ($description) | |
setEncoder (Swift_Mime_ContentEncoder $encoder) | |
setId ($id) | |
setMaxLineLength ($length) | |
toByteStream (Swift_InputByteStream $is) | |
toString () | |
Public Member Functions inherited from Swift_Mime_MimeEntity | |
setChildren (array $children) | |
Protected Member Functions | |
_clearCache () | |
_fixHeaders () | |
_getCache () | |
_getHeaderFieldModel ($field) | |
_getHeaderParameter ($field, $parameter) | |
_getIdField () | |
_setHeaderFieldModel ($field, $model) | |
_setHeaderParameter ($field, $parameter, $value) | |
getRandomId () | |
Protected Attributes | |
$_userContentType | |
Private Member Functions | |
_assertValidBoundary ($boundary) | |
_childSortAlgorithm ($a, $b) | |
_createChild () | |
_getCompoundLevel ($children) | |
_getNeededChildLevel ($child, $compoundLevel) | |
_notifyCharsetChanged ($charset) | |
_notifyEncoderChanged (Swift_Mime_ContentEncoder $encoder) | |
_readStream (Swift_OutputByteStream $os) | |
_setContentTypeInHeaders ($type) | |
_setEncoding ($encoding) | |
_setNestingLevel ($level) | |
_sortChildren () | |
Private Attributes | |
$_alternativePartOrder | |
$_body | |
$_boundary | |
$_cache | |
$_cacheKey | |
$_children = array() | |
$_compositeRanges | |
$_compoundLevelFilters = array() | |
$_encoder | |
$_headers | |
$_id | |
$_immediateChildren = array() | |
$_maxLineLength = 78 | |
$_nestingLevel = self::LEVEL_ALTERNATIVE | |
Additional Inherited Members | |
Public Attributes inherited from Swift_Mime_MimeEntity | |
const | LEVEL_ALTERNATIVE = 4096 |
const | LEVEL_MIXED = 256 |
const | LEVEL_RELATED = 65536 |
const | LEVEL_TOP = 16 |
Definition at line 22 of file SimpleMimeEntity.php.
Swift_Mime_SimpleMimeEntity::__construct | ( | Swift_Mime_HeaderSet | $headers, |
Swift_Mime_ContentEncoder | $encoder, | ||
Swift_KeyCache | $cache | ||
) |
Create a new SimpleMimeEntity with $headers, $encoder and $cache.
Swift_Mime_HeaderSet | $headers | |
Swift_Mime_ContentEncoder | $encoder | |
Swift_KeyCache | $cache |
Definition at line 83 of file SimpleMimeEntity.php.
References getRandomId(), and setEncoder().
Swift_Mime_SimpleMimeEntity::__destruct | ( | ) |
Empties it's own contents from the cache.
Definition at line 798 of file SimpleMimeEntity.php.
Swift_Mime_SimpleMimeEntity::__toString | ( | ) |
Returns a string representation of this object.
Definition at line 478 of file SimpleMimeEntity.php.
References toString().
|
private |
Definition at line 675 of file SimpleMimeEntity.php.
Referenced by setBoundary().
|
private |
Definition at line 777 of file SimpleMimeEntity.php.
References $type.
|
protected |
Empty the KeyCache for this entity.
Definition at line 637 of file SimpleMimeEntity.php.
Referenced by setBody(), Swift_Mime_MimePart\setCharset(), and setEncoder().
|
private |
Definition at line 733 of file SimpleMimeEntity.php.
References $_cache, and $_encoder.
Referenced by setChildren().
|
protected |
Re-evaluate what content type and encoding should be used on this entity.
Definition at line 610 of file SimpleMimeEntity.php.
References _setEncoding(), _setHeaderParameter(), and getBoundary().
Referenced by setChildren().
|
protected |
Get the KeyCache used in this entity.
Definition at line 629 of file SimpleMimeEntity.php.
References $_cache.
Referenced by Swift_Mime_SimpleMessage\_becomeMimePart().
|
private |
Definition at line 698 of file SimpleMimeEntity.php.
Referenced by setChildren().
|
protected |
Get the model data (usually an array or a string) for $field.
Definition at line 556 of file SimpleMimeEntity.php.
References $field.
Referenced by Swift_Mime_SimpleMessage\getBcc(), Swift_Mime_SimpleMessage\getCc(), getContentType(), Swift_Mime_SimpleMessage\getDate(), getDescription(), Swift_Mime_Attachment\getDisposition(), Swift_Mime_SimpleMessage\getFrom(), getId(), Swift_Mime_SimpleMessage\getPriority(), Swift_Mime_SimpleMessage\getReadReceiptTo(), Swift_Mime_SimpleMessage\getReplyTo(), Swift_Mime_SimpleMessage\getReturnPath(), Swift_Mime_SimpleMessage\getSender(), Swift_Mime_SimpleMessage\getSubject(), and Swift_Mime_SimpleMessage\getTo().
|
protected |
Get the parameter value of $parameter on $field header.
Definition at line 583 of file SimpleMimeEntity.php.
References $field.
Referenced by Swift_Mime_MimePart\getCharset(), Swift_Mime_MimePart\getDelSp(), Swift_Mime_Attachment\getFilename(), Swift_Mime_MimePart\getFormat(), and Swift_Mime_Attachment\getSize().
|
protected |
Get the name of the header that provides the ID of this entity
Definition at line 548 of file SimpleMimeEntity.php.
Referenced by getId(), and setId().
|
private |
Definition at line 708 of file SimpleMimeEntity.php.
Referenced by setChildren().
|
private |
Definition at line 747 of file SimpleMimeEntity.php.
Referenced by charsetChanged().
|
private |
Definition at line 739 of file SimpleMimeEntity.php.
Referenced by encoderChanged(), and setEncoder().
|
private |
Definition at line 657 of file SimpleMimeEntity.php.
References Swift_OutputByteStream\read().
Referenced by getBody().
|
private |
Definition at line 685 of file SimpleMimeEntity.php.
References $type, and _setHeaderFieldModel().
Referenced by setChildren(), and setContentType().
|
private |
Definition at line 667 of file SimpleMimeEntity.php.
References _setHeaderFieldModel().
Referenced by _fixHeaders(), and setEncoder().
|
protected |
Set the model data for $field.
Definition at line 567 of file SimpleMimeEntity.php.
References $field.
Referenced by _setContentTypeInHeaders(), _setEncoding(), Swift_Mime_SimpleMessage\setBcc(), Swift_Mime_SimpleMessage\setCc(), Swift_Mime_SimpleMessage\setDate(), setDescription(), Swift_Mime_Attachment\setDisposition(), Swift_Mime_SimpleMessage\setFrom(), setId(), Swift_Mime_SimpleMessage\setPriority(), Swift_Mime_SimpleMessage\setReadReceiptTo(), Swift_Mime_SimpleMessage\setReplyTo(), Swift_Mime_SimpleMessage\setReturnPath(), Swift_Mime_SimpleMessage\setSender(), Swift_Mime_SimpleMessage\setSubject(), and Swift_Mime_SimpleMessage\setTo().
|
protected |
Set the parameter value of $parameter on $field header.
Definition at line 594 of file SimpleMimeEntity.php.
References $field.
Referenced by Swift_Mime_MimePart\_fixHeaders(), _fixHeaders(), Swift_Mime_MimePart\setCharset(), Swift_Mime_MimePart\setDelSp(), Swift_Mime_Attachment\setFilename(), Swift_Mime_MimePart\setFormat(), and Swift_Mime_Attachment\setSize().
|
private |
Definition at line 693 of file SimpleMimeEntity.php.
|
private |
Definition at line 757 of file SimpleMimeEntity.php.
Referenced by setChildren().
Swift_Mime_SimpleMimeEntity::charsetChanged | ( | $charset | ) |
Receive notification that the charset of this entity, or a parent entity has changed.
string | $charset |
Implements Swift_Mime_CharsetObserver.
Definition at line 418 of file SimpleMimeEntity.php.
References _notifyCharsetChanged().
Swift_Mime_SimpleMimeEntity::encoderChanged | ( | Swift_Mime_ContentEncoder | $encoder | ) |
Receive notification that the encoder of this entity or a parent entity has changed.
Swift_Mime_ContentEncoder | $encoder |
Implements Swift_Mime_EncodingObserver.
Definition at line 428 of file SimpleMimeEntity.php.
References _notifyEncoderChanged().
Swift_Mime_SimpleMimeEntity::generateId | ( | ) |
Generate a new Content-ID or Message-ID for this MIME entity.
Definition at line 123 of file SimpleMimeEntity.php.
References $_id, getRandomId(), and setId().
Swift_Mime_SimpleMimeEntity::getBody | ( | ) |
Get the body of this entity as a string.
Implements Swift_Mime_MimeEntity.
Definition at line 334 of file SimpleMimeEntity.php.
References $_body, and _readStream().
Referenced by toString().
Swift_Mime_SimpleMimeEntity::getBoundary | ( | ) |
Get the boundary used to separate children in this entity.
Definition at line 392 of file SimpleMimeEntity.php.
References $_boundary.
Referenced by _fixHeaders(), toByteStream(), and toString().
Swift_Mime_SimpleMimeEntity::getChildren | ( | ) |
Get all children added to this entity.
Implements Swift_Mime_MimeEntity.
Definition at line 244 of file SimpleMimeEntity.php.
References $_children.
Referenced by Swift_Mime_MimePart\_fixHeaders().
Swift_Mime_SimpleMimeEntity::getContentType | ( | ) |
Get the Content-type of this entity.
Implements Swift_Mime_MimeEntity.
Definition at line 152 of file SimpleMimeEntity.php.
References _getHeaderFieldModel().
Swift_Mime_SimpleMimeEntity::getDescription | ( | ) |
Get the description of this entity. This value comes from the Content-Description header if set.
Definition at line 201 of file SimpleMimeEntity.php.
References _getHeaderFieldModel().
Swift_Mime_SimpleMimeEntity::getEncoder | ( | ) |
Get the encoder used for the body of this entity.
Definition at line 366 of file SimpleMimeEntity.php.
References $_encoder.
Referenced by Swift_Mime_SimpleMessage\_becomeMimePart().
Swift_Mime_SimpleMimeEntity::getHeaders | ( | ) |
Get the Swift_Mime_HeaderSet for this entity.
Implements Swift_Mime_MimeEntity.
Definition at line 133 of file SimpleMimeEntity.php.
References $_headers.
Referenced by Swift_Mime_Attachment\setDisposition().
Swift_Mime_SimpleMimeEntity::getId | ( | ) |
Get the CID of this entity. The CID will only be present in headers if a Content-ID header is present.
Implements Swift_Mime_MimeEntity.
Definition at line 175 of file SimpleMimeEntity.php.
References $_id, _getHeaderFieldModel(), and _getIdField().
Referenced by Swift_Mime_EmbeddedFile\__construct().
Swift_Mime_SimpleMimeEntity::getMaxLineLength | ( | ) |
Get the maximum line length of the body of this entity.
Definition at line 224 of file SimpleMimeEntity.php.
References $_maxLineLength.
Referenced by toByteStream(), and toString().
Swift_Mime_SimpleMimeEntity::getNestingLevel | ( | ) |
Get the nesting level of this entity.
Implements Swift_Mime_MimeEntity.
Definition at line 143 of file SimpleMimeEntity.php.
References $_nestingLevel.
|
protected |
Returns a random Content-ID or Message-ID.
Definition at line 646 of file SimpleMimeEntity.php.
Referenced by __construct(), and generateId().
Swift_Mime_SimpleMimeEntity::setBody | ( | $body, | |
$contentType = null |
|||
) |
Set the body of this entity, either as a string, or as an instance of Swift_OutputByteStream.
mixed | $body | |
string | $contentType | optional |
Implements Swift_Mime_MimeEntity.
Definition at line 347 of file SimpleMimeEntity.php.
References _clearCache(), and setContentType().
Referenced by Swift_Attachment\__construct(), Swift_EmbeddedFile\__construct(), and Swift_Mime_Attachment\setFile().
Swift_Mime_SimpleMimeEntity::setBoundary | ( | $boundary | ) |
Set the boundary used to separate children in this entity.
string | $boundary |
Swift_RfcComplianceException |
Definition at line 406 of file SimpleMimeEntity.php.
References _assertValidBoundary().
Swift_Mime_SimpleMimeEntity::setChildren | ( | array | $children, |
$compoundLevel = null |
|||
) |
Set all children of this entity.
array | $children | Swiift_Mime_Entity instances |
int | $compoundLevel | For internal use only |
Definition at line 254 of file SimpleMimeEntity.php.
References $_userContentType, _createChild(), _fixHeaders(), _getCompoundLevel(), _getNeededChildLevel(), _setContentTypeInHeaders(), _sortChildren(), and elseif().
Swift_Mime_SimpleMimeEntity::setContentType | ( | $type | ) |
Set the Content-type of this entity.
string | $type |
Definition at line 161 of file SimpleMimeEntity.php.
References $type, and _setContentTypeInHeaders().
Referenced by Swift_MimePart\__construct(), Swift_EmbeddedFile\__construct(), Swift_Attachment\__construct(), Swift_Message\__construct(), Swift_Mime_Attachment\__construct(), Swift_Mime_MimePart\__construct(), setBody(), and Swift_Mime_Attachment\setFile().
Swift_Mime_SimpleMimeEntity::setDescription | ( | $description | ) |
Set the description of this entity. This method sets a value in the Content-ID header.
string | $description |
Definition at line 211 of file SimpleMimeEntity.php.
References _setHeaderFieldModel().
Swift_Mime_SimpleMimeEntity::setEncoder | ( | Swift_Mime_ContentEncoder | $encoder | ) |
Set the encoder used for the body of this entity.
Swift_Mime_ContentEncoder | $encoder |
Definition at line 375 of file SimpleMimeEntity.php.
References _clearCache(), _notifyEncoderChanged(), _setEncoding(), and Swift_Mime_ContentEncoder\getName().
Referenced by __construct().
Swift_Mime_SimpleMimeEntity::setId | ( | $id | ) |
Set the CID of this entity.
string | $id |
Definition at line 186 of file SimpleMimeEntity.php.
References $id, _getIdField(), and _setHeaderFieldModel().
Referenced by Swift_Mime_EmbeddedFile\__construct(), Swift_Mime_SimpleMessage\__construct(), and generateId().
Swift_Mime_SimpleMimeEntity::setMaxLineLength | ( | $length | ) |
Set the maximum line length of lines in this body. Though not enforced by the library, lines should not exceed 1000 chars.
int | $length |
Definition at line 234 of file SimpleMimeEntity.php.
Swift_Mime_SimpleMimeEntity::toByteStream | ( | Swift_InputByteStream | $is | ) |
Write this entire entity to a Swift_InputByteStream.
Swift_InputByteStream |
Implements Swift_Mime_MimeEntity.
Definition at line 487 of file SimpleMimeEntity.php.
References Swift_InputByteStream\bind(), Swift_InputByteStream\commit(), getBoundary(), getMaxLineLength(), Swift_InputByteStream\unbind(), and Swift_InputByteStream\write().
Swift_Mime_SimpleMimeEntity::toString | ( | ) |
Get this entire entity as a string.
Implements Swift_Mime_MimeEntity.
Definition at line 437 of file SimpleMimeEntity.php.
References getBody(), getBoundary(), getMaxLineLength(), and Swift_KeyCache\MODE_WRITE.
Referenced by __toString().
|
private |
The order in which alternative mime types should appear
Definition at line 63 of file SimpleMimeEntity.php.
|
private |
The body as a string, or a stream
Definition at line 29 of file SimpleMimeEntity.php.
Referenced by getBody().
|
private |
A mime bounary, if any is used
Definition at line 35 of file SimpleMimeEntity.php.
Referenced by getBoundary().
|
private |
A KeyCache instance used during encoding and streaming
Definition at line 51 of file SimpleMimeEntity.php.
Referenced by _createChild(), and _getCache().
|
private |
The key used for accessing the cache
Definition at line 73 of file SimpleMimeEntity.php.
|
private |
All descendants of this entity
Definition at line 57 of file SimpleMimeEntity.php.
Referenced by getChildren().
|
private |
Mime types to be used based on the nesting level
Definition at line 38 of file SimpleMimeEntity.php.
|
private |
A set of filter rules to define what level an entity should be nested at
Definition at line 45 of file SimpleMimeEntity.php.
|
private |
The encoder that encodes the body into a streamable format
Definition at line 32 of file SimpleMimeEntity.php.
Referenced by _createChild(), and getEncoder().
|
private |
A collection of Headers for this mime entity
Definition at line 26 of file SimpleMimeEntity.php.
Referenced by getHeaders().
|
private |
The CID of this entity
Definition at line 70 of file SimpleMimeEntity.php.
Referenced by generateId(), and getId().
|
private |
Direct descendants of this entity
Definition at line 54 of file SimpleMimeEntity.php.
|
private |
The maximum line length of the body of this entity
Definition at line 60 of file SimpleMimeEntity.php.
Referenced by getMaxLineLength().
|
private |
The nesting level of this entity
Definition at line 48 of file SimpleMimeEntity.php.
Referenced by getNestingLevel().
|
protected |
Definition at line 75 of file SimpleMimeEntity.php.
Referenced by setChildren().