PHP Class Swift_Mime_Attachment, Halite

Author: Chris Corbyn
Inheritance: extends Swift_Mime_SimpleMimeEntity
Datei anzeigen Open project: HaliteChallenge/Halite Class Usage Examples

Public Methods

Method Description
__construct ( Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_Mime_Grammar $grammar, array $mimeTypes = [] ) Create a new Attachment with $headers, $encoder and $cache.
getDisposition ( ) : string Get the Content-Disposition of this attachment.
getFilename ( ) : string Get the filename of this attachment when downloaded.
getNestingLevel ( ) : integer Get the nesting level used for this attachment.
getSize ( ) : integer Get the file size of this attachment.
setDisposition ( string $disposition ) : Swift_Mime_Attachment Set the Content-Disposition of this attachment.
setFile ( Swift_FileStream $file, string $contentType = null ) : Swift_Mime_Attachment Set the file that this attachment is for.
setFilename ( string $filename ) : Swift_Mime_Attachment Set the filename of this attachment.
setSize ( integer $size ) : Swift_Mime_Attachment Set the file size of this attachment.

Method Details

__construct() public method

Create a new Attachment with $headers, $encoder and $cache.
public __construct ( Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_Mime_Grammar $grammar, array $mimeTypes = [] )
$headers Swift_Mime_HeaderSet
$encoder Swift_Mime_ContentEncoder
$cache Swift_KeyCache
$grammar Swift_Mime_Grammar
$mimeTypes array optional

getDisposition() public method

By default attachments have a disposition of "attachment".
public getDisposition ( ) : string
return string

getFilename() public method

Get the filename of this attachment when downloaded.
public getFilename ( ) : string
return string

getNestingLevel() public method

Always returns {@link LEVEL_MIXED}.
public getNestingLevel ( ) : integer
return integer

getSize() public method

Get the file size of this attachment.
public getSize ( ) : integer
return integer

setDisposition() public method

Set the Content-Disposition of this attachment.
public setDisposition ( string $disposition ) : Swift_Mime_Attachment
$disposition string
return Swift_Mime_Attachment

setFile() public method

Set the file that this attachment is for.
public setFile ( Swift_FileStream $file, string $contentType = null ) : Swift_Mime_Attachment
$file Swift_FileStream
$contentType string optional
return Swift_Mime_Attachment

setFilename() public method

Set the filename of this attachment.
public setFilename ( string $filename ) : Swift_Mime_Attachment
$filename string
return Swift_Mime_Attachment

setSize() public method

Set the file size of this attachment.
public setSize ( integer $size ) : Swift_Mime_Attachment
$size integer
return Swift_Mime_Attachment