Elgg  Version 3.0
Public Member Functions | Static Public Member Functions | List of all members
Elgg\Email\Attachment Class Reference

Email attachment. More...

Inheritance diagram for Elgg\Email\Attachment:

Public Member Functions

 __construct ($content= '')
 create a new Mime Part. More...
 

Static Public Member Functions

static factory ($options)
 Create an attachment. More...
 
static fromElggFile (\ElggFile $file)
 Create an attachment from an ElggFile. More...
 

Detailed Description

Email attachment.

Definition at line 12 of file Attachment.php.

Constructor & Destructor Documentation

Elgg\Email\Attachment::__construct (   $content = '')

create a new Mime Part.

The (unencoded) content of the Part as passed as a string or stream

Parameters
mixed$contentString or Stream containing the content
Exceptions

Definition at line 25 of file Attachment.php.

Member Function Documentation

static Elgg\Email\Attachment::factory (   $options)
static

Create an attachment.

Parameters
mixed$optionsan array or an ElggFile, supported array keys are: content: (string) the file contents of the attachment filepath: (string) if content isn't provided, a filepath can be given to fetch the content from filename: (string) the name of the attachment type: (string) the mimetype encoding: (string) the content encoding disposition: (string) the attachment disposition (default: attachment) charset: (string) the charset
See also
Returns
false| return the attachment or false on error

Definition at line 48 of file Attachment.php.

static Elgg\Email\Attachment::fromElggFile ( \ElggFile  $file)
static

Create an attachment from an ElggFile.

Parameters
\ElggFile$filethe file
Returns
false|

Definition at line 104 of file Attachment.php.


The documentation for this class was generated from the following file: