Class Swift_Message_Attachment

Description

Attachment component for Swift Mailer

Located in /Swift/Message/Attachment.php (line 18)

Swift_Message_Mime
   |
   --Swift_Message_Attachment
Direct descendents
Class Description
Swift_Message_EmbeddedFile Embedded File component for Swift Mailer
Method Summary
Swift_Message_Attachment __construct ([mixed $data = null], [string $name = null], [string $type = "application/octet-stream"], [string $encoding = "base64"], [ $disposition = "attachment"])
string getDescription ()
string getDisposition ()
string getFileName ()
void preBuild ()
void setData (mixed $data, [boolean $read_filename = true])
void setDescription (string $desc)
void setDisposition (string $disposition)
void setFileName (string $name)
Methods
Constructor __construct (line 27)

Constructor

Swift_Message_Attachment __construct ([mixed $data = null], [string $name = null], [string $type = "application/octet-stream"], [string $encoding = "base64"], [ $disposition = "attachment"])
  • mixed $data: The data to use in the body
  • string $name: Mime type
  • string $type: The encoding format used
  • string $encoding: The charset used
  • $disposition

Redefinition of:
Swift_Message_Mime::__construct()
Constructor

Redefined in descendants as:
getDescription (line 90)

Return the description in the headers

string getDescription ()
getDisposition (line 110)

Get the disposition used in the attachment (usually inline or attachment)

string getDisposition ()
getFileName (line 70)

Get the filename of this attachment

  • throws: Swift_Message_MimeException If some vital headers have been removed
string getFileName ()
preBuild (line 121)

Execute needed logic prior to building

void preBuild ()

Redefinition of:
Swift_Message_Mime::preBuild()
Execute any logic needed prior to building
setData (line 45)

Overrides setData() in MIME so that a filename can be set

  • throws: Swift_FileException If the stream cannot be read
void setData (mixed $data, [boolean $read_filename = true])
  • mixed $data: The data to set for the body
  • boolean $read_filename: If the stream is a file, should it's filename be used?

Redefinition of:
Swift_Message_Mime::setData()
Specify the string which makes up the body of this message HINT: You can always nest another MIME document here if you call it's build() method.

Redefined in descendants as:
setDescription (line 82)

Set the Content-Description header

void setDescription (string $desc)
  • string $desc: The description in the header (filename usually!)
setDisposition (line 102)

Set the disposition of the attachment (usually inline or attachment)

void setDisposition (string $disposition)
  • string $disposition: The value to use in the Content-Disposition field
setFileName (line 59)

Set the name (and description) used to identify the file

This method overrides any value previously set with setDescription()

  • throws: Swift_Message_MimeException If some required headers have been deliberately removed
void setFileName (string $name)
  • string $name: The filename including it's extension if any

Inherited Methods

Inherited From Swift_Message_Mime

Swift_Message_Mime::__construct()
Swift_Message_Mime::addChild()
Swift_Message_Mime::build()
Swift_Message_Mime::buildData()
Swift_Message_Mime::getChild()
Swift_Message_Mime::getContentType()
Swift_Message_Mime::getData()
Swift_Message_Mime::getEncoding()
Swift_Message_Mime::getLE()
Swift_Message_Mime::getLevel()
Swift_Message_Mime::hasChild()
Swift_Message_Mime::listChildren()
Swift_Message_Mime::numChildren()
Swift_Message_Mime::preBuild()
Swift_Message_Mime::removeChild()
Swift_Message_Mime::setContentType()
Swift_Message_Mime::setData()
Swift_Message_Mime::setEncoding()
Swift_Message_Mime::setHeaders()
Swift_Message_Mime::setLE()
Swift_Message_Mime::setLevel()
Swift_Message_Mime::setLineWrap()
Swift_Message_Mime::uncacheAll()
Class Constants

Documentation generated on Tue, 06 Mar 2007 23:32:20 +0000 by phpDocumentor 1.3.1