Email attachment.
More...
Email attachment.
Definition at line 11 of file Attachment.php.
◆ __construct()
Elgg\Email\Attachment::__construct |
( |
|
$content = '' | ) |
|
◆ factory()
static Elgg\Email\Attachment::factory |
( |
|
$options | ) |
|
|
static |
Create an attachment.
- Parameters
-
mixed | $options | an 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
- \Laminas\Mime\Part
- Returns
- false|\Elgg\Email\Attachment return the attachment or false on error
Definition at line 39 of file Attachment.php.
◆ fromElggFile()
static Elgg\Email\Attachment::fromElggFile |
( |
\ElggFile |
$file | ) |
|
|
static |
Create an attachment from an ElggFile.
- Parameters
-
- Returns
- false|\Elgg\Email\Attachment
Definition at line 95 of file Attachment.php.
The documentation for this class was generated from the following file: