TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
Swift_Mime_MimePart Class Reference
Inheritance diagram for Swift_Mime_MimePart:
Swift_Mime_SimpleMimeEntity Swift_Mime_MimeEntity Swift_Mime_CharsetObserver Swift_Mime_EncodingObserver Swift_Mime_SimpleMessage Swift_MimePart Swift_Message Swift_SignedMessage MailMessage

Public Member Functions

 __construct (Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_Mime_Grammar $grammar, $charset=null)
 
 setBody ($body, $contentType=null, $charset=null)
 
 getCharset ()
 
 setCharset ($charset)
 
 getFormat ()
 
 setFormat ($format)
 
 getDelSp ()
 
 setDelSp ($delsp=true)
 
 getNestingLevel ()
 
 charsetChanged ($charset)
 
- Public Member Functions inherited from Swift_Mime_SimpleMimeEntity
 __construct (Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_Mime_Grammar $grammar)
 
 generateId ()
 
 getHeaders ()
 
 getNestingLevel ()
 
 getContentType ()
 
 setContentType ($type)
 
 getId ()
 
 setId ($id)
 
 getDescription ()
 
 setDescription ($description)
 
 getMaxLineLength ()
 
 setMaxLineLength ($length)
 
 getChildren ()
 
 setChildren (array $children, $compoundLevel=null)
 
 getBody ()
 
 setBody ($body, $contentType=null)
 
 getEncoder ()
 
 setEncoder (Swift_Mime_ContentEncoder $encoder)
 
 getBoundary ()
 
 setBoundary ($boundary)
 
 charsetChanged ($charset)
 
 encoderChanged (Swift_Mime_ContentEncoder $encoder)
 
 toString ()
 
 __toString ()
 
 toByteStream (Swift_InputByteStream $is)
 
 __destruct ()
 
 __clone ()
 
- Public Member Functions inherited from Swift_Mime_MimeEntity
 setChildren (array $children)
 

Protected Member Functions

 _fixHeaders ()
 
 _setNestingLevel ($level)
 
 _convertString ($string)
 
- Protected Member Functions inherited from Swift_Mime_SimpleMimeEntity
 _bodyToString ()
 
 _bodyToByteStream (Swift_InputByteStream $is)
 
 _getIdField ()
 
 _getHeaderFieldModel ($field)
 
 _setHeaderFieldModel ($field, $model)
 
 _getHeaderParameter ($field, $parameter)
 
 _setHeaderParameter ($field, $parameter, $value)
 
 _fixHeaders ()
 
 _getCache ()
 
 _getGrammar ()
 
 _clearCache ()
 
 getRandomId ()
 

Protected Attributes

 $_userFormat
 
 $_userCharset
 
 $_userDelSp
 
- Protected Attributes inherited from Swift_Mime_SimpleMimeEntity
 $_userContentType
 

Private Attributes

 $_nestingLevel = self::LEVEL_ALTERNATIVE
 

Additional Inherited Members

- Public Attributes inherited from Swift_Mime_MimeEntity
const LEVEL_TOP = 16
 
const LEVEL_MIXED = 256
 
const LEVEL_ALTERNATIVE = 4096
 
const LEVEL_RELATED = 65536
 

Detailed Description

A MIME part, in a multipart message.

Author
Chris Corbyn

Definition at line 16 of file Mime/MimePart.php.

Constructor & Destructor Documentation

__construct ( Swift_Mime_HeaderSet  $headers,
Swift_Mime_ContentEncoder  $encoder,
Swift_KeyCache  $cache,
Swift_Mime_Grammar  $grammar,
  $charset = null 
)

Create a new MimePart with $headers, $encoder and $cache.

Parameters
Swift_Mime_HeaderSet$headers
Swift_Mime_ContentEncoder$encoder
Swift_KeyCache$cache
Swift_Mime_Grammar$grammar
string$charset

Definition at line 39 of file Mime/MimePart.php.

References setCharset(), and Swift_Mime_SimpleMimeEntity\setContentType().

Member Function Documentation

_convertString (   $string)
protected

Encode charset when charset is not utf-8

Definition at line 196 of file Mime/MimePart.php.

References elseif, and getCharset().

Referenced by setBody().

_fixHeaders ( )
protected

Fix the content-type and encoding of this entity

Definition at line 175 of file Mime/MimePart.php.

References Swift_Mime_SimpleMimeEntity\_setHeaderParameter(), Swift_Mime_SimpleMimeEntity\getChildren(), setCharset(), setDelSp(), and setFormat().

_setNestingLevel (   $level)
protected

Set the nesting level of this entity

Definition at line 190 of file Mime/MimePart.php.

charsetChanged (   $charset)

Receive notification that the charset has changed on this document, or a parent document.

Parameters
string$charset

Implements Swift_Mime_CharsetObserver.

Definition at line 169 of file Mime/MimePart.php.

References setCharset().

getCharset ( )

Get the character set of this entity.

Returns
string

Definition at line 75 of file Mime/MimePart.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderParameter().

Referenced by _convertString(), and Swift_Signers_SMimeSigner\createMessage().

getDelSp ( )

Test if delsp is being used for this entity.

Returns
bool

Definition at line 129 of file Mime/MimePart.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderParameter().

getFormat ( )

Get the format of this entity (i.e. flowed or fixed).

Returns
string

Definition at line 104 of file Mime/MimePart.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderParameter().

getNestingLevel ( )

Get the nesting level of this entity.

See Also
LEVEL_TOP, LEVEL_ALTERNATIVE, LEVEL_MIXED, LEVEL_RELATED
Returns
int

Implements Swift_Mime_MimeEntity.

Definition at line 158 of file Mime/MimePart.php.

References $_nestingLevel.

setBody (   $body,
  $contentType = null,
  $charset = null 
)

Set the body of this entity, either as a string, or as an instance of Swift_OutputByteStream.

Parameters
mixed$body
string$contentTypeoptional
string$charsetoptional
Returns
Swift_Mime_MimePart

Definition at line 58 of file Mime/MimePart.php.

References _convertString(), and setCharset().

Referenced by Swift_MimePart\__construct(), Swift_Message\__construct(), Swift_Message\restoreMessage(), Swift_Message\saveMessage(), and Swift_Signers_SMimeSigner\streamToMime().

setCharset (   $charset)
setDelSp (   $delsp = true)

Turn delsp on or off for this entity.

Parameters
bool$delsp
Returns
Swift_Mime_MimePart

Definition at line 143 of file Mime/MimePart.php.

References Swift_Mime_SimpleMimeEntity\_setHeaderParameter().

Referenced by _fixHeaders().

setFormat (   $format)

Set the format of this entity (flowed or fixed).

Parameters
string$format
Returns
Swift_Mime_MimePart

Definition at line 116 of file Mime/MimePart.php.

References Swift_Mime_SimpleMimeEntity\_setHeaderParameter().

Referenced by _fixHeaders().

Member Data Documentation

$_nestingLevel = self::LEVEL_ALTERNATIVE
private

The nesting level of this MimePart

Definition at line 28 of file Mime/MimePart.php.

Referenced by getNestingLevel().

$_userCharset
protected

The charset last specified by the user

Definition at line 22 of file Mime/MimePart.php.

$_userDelSp
protected

The delsp parameter last specified by the user

Definition at line 25 of file Mime/MimePart.php.

$_userFormat
protected

The format parameter last specified by the user

Definition at line 19 of file Mime/MimePart.php.