TYPO3  7.6
Public Member Functions | Private Attributes | List of all members
Swift_Mime_Attachment Class Reference
Inheritance diagram for Swift_Mime_Attachment:
Swift_Mime_SimpleMimeEntity Swift_Mime_MimeEntity Swift_Mime_CharsetObserver Swift_Mime_EncodingObserver Swift_Attachment Swift_Mime_EmbeddedFile Swift_EmbeddedFile Swift_Image

Public Member Functions

 __construct (Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_Mime_Grammar $grammar, $mimeTypes=array())
 
 getNestingLevel ()
 
 getDisposition ()
 
 setDisposition ($disposition)
 
 getFilename ()
 
 setFilename ($filename)
 
 getSize ()
 
 setSize ($size)
 
 setFile (Swift_FileStream $file, $contentType=null)
 
- 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)
 

Private Attributes

 $_mimeTypes = array()
 

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
 
- 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 inherited from Swift_Mime_SimpleMimeEntity
 $_userContentType
 

Detailed Description

An attachment, in a multipart message.

Author
Chris Corbyn

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

Constructor & Destructor Documentation

__construct ( Swift_Mime_HeaderSet  $headers,
Swift_Mime_ContentEncoder  $encoder,
Swift_KeyCache  $cache,
Swift_Mime_Grammar  $grammar,
  $mimeTypes = array() 
)

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

Parameters
Swift_Mime_HeaderSet$headers
Swift_Mime_ContentEncoder$encoder
Swift_KeyCache$cache
Swift_Mime_Grammar$grammar
array$mimeTypesoptional

Definition at line 30 of file Mime/Attachment.php.

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

Member Function Documentation

getDisposition ( )

Get the Content-Disposition of this attachment.

By default attachments have a disposition of "attachment".

Returns
string

Definition at line 57 of file Mime/Attachment.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderFieldModel().

getFilename ( )

Get the filename of this attachment when downloaded.

Returns
string

Definition at line 85 of file Mime/Attachment.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderParameter().

getNestingLevel ( )

Get the nesting level used for this attachment.

Always returns LEVEL_MIXED.

Returns
int

Implements Swift_Mime_MimeEntity.

Definition at line 45 of file Mime/Attachment.php.

getSize ( )

Get the file size of this attachment.

Returns
int

Definition at line 110 of file Mime/Attachment.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderParameter().

setDisposition (   $disposition)

Set the Content-Disposition of this attachment.

Parameters
string$disposition
Returns
Swift_Mime_Attachment

Definition at line 69 of file Mime/Attachment.php.

References Swift_Mime_SimpleMimeEntity\_setHeaderFieldModel(), and Swift_Mime_SimpleMimeEntity\getHeaders().

Referenced by Swift_Mime_EmbeddedFile\__construct(), and __construct().

setFile ( Swift_FileStream  $file,
  $contentType = null 
)

Set the file that this attachment is for.

Parameters
Swift_FileStream$file
string$contentTypeoptional
Returns
Swift_Mime_Attachment

Definition at line 137 of file Mime/Attachment.php.

References Swift_FileStream\getPath(), Swift_Mime_SimpleMimeEntity\setBody(), Swift_Mime_SimpleMimeEntity\setContentType(), and setFilename().

setFilename (   $filename)

Set the filename of this attachment.

Parameters
string$filename
Returns
Swift_Mime_Attachment

Definition at line 97 of file Mime/Attachment.php.

References $filename, and Swift_Mime_SimpleMimeEntity\_setHeaderParameter().

Referenced by Swift_Attachment\__construct(), Swift_EmbeddedFile\__construct(), and setFile().

setSize (   $size)

Set the file size of this attachment.

Parameters
int$size
Returns
Swift_Mime_Attachment

Definition at line 122 of file Mime/Attachment.php.

References Swift_Mime_SimpleMimeEntity\_setHeaderParameter().

Member Data Documentation

$_mimeTypes = array()
private

Recognized MIME types

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