phpDocumentor

EmailAttachment
in package
implements EmailAttachmentInterface

Class EmailAttachment

Email attachment will serve as the path to the file that needs to be attached (located on the server).

Tags
category

System

subpackage

Entities

Interfaces, Classes and Traits

EmailAttachmentInterface
Interface EmailAttachmentInterface

Table of Contents

$configuration  : AttachmentConfigurationInterface|null
E-Mail attachment configuration.
$name  : string
E-Mail attachment name.
$path  : string
E-Mail attachment path.
__construct()  : mixed
Constructor
getConfiguration()  : AttachmentConfigurationInterface|null
Returns the configuration of an email attachment.
getName()  : AttachmentNameInterface
Returns the name of an email attachment.
getPath()  : AttachmentPathInterface
Returns the path of an email attachment.
setConfiguration()  : mixed
Sets the configuration of an email attachment.
setName()  : mixed
Sets the name of an email attachment.
setPath()  : mixed
Sets the path of an email attachment.
_convertToRelativePath()  : string
Convert a path to relative.

Properties

Methods

__construct()

Constructor

public __construct([AttachmentPathInterface $path = null ][, AttachmentNameInterface $name = null ][, AttachmentConfigurationInterface $configuration = null ]) : mixed

Entity representing an email attachment.

Parameters
$path : AttachmentPathInterface = null

(optional) Attachment path.

$name : AttachmentNameInterface = null

(optional) Attachment name.

$configuration : AttachmentConfigurationInterface = null

(optional) Attachment configuration.

Return values
mixed

_convertToRelativePath()

Convert a path to relative.

protected _convertToRelativePath([AttachmentPathInterface $path = null ]) : string

Due to different server setups this process can be tedious and hard to foresee. The following method contains the conversion logic and must be used in any setter of the class.

Parameters
$path : AttachmentPathInterface = null

Attachment path.

Return values
string

Returns the converted path.

Search results