EmailContact
in package
implements
EmailContactInterface
Class EmailContact
Represents a contact (sender/recipient) that participates in an email entity.
Tags
Interfaces, Classes and Traits
- EmailContactInterface
- Interface EmailContactInterface
Table of Contents
- $contactName : ContactNameInterface
- E-Mail contact name.
- $contactType : ContactTypeInterface
- E-Mail contact type.
- $emailAddress : EmailAddressInterface
- E-Mail address.
- __construct() : mixed
- Constructor
- __toString() : string
- Return contact information as a string.
- getContactName() : string
- Returns the contact name of an email.
- getContactType() : ContactTypeInterface
- Returns the contact type of an email.
- getEmailAddress() : string
- Returns an email address.
- setContactName() : mixed
- Sets the contact name of an email.
- setContactType() : mixed
- Sets the contact type of an email.
- setEmailAddress() : mixed
- Sets an email address.
Properties
$contactName
E-Mail contact name.
protected
ContactNameInterface
$contactName
$contactType
E-Mail contact type.
protected
ContactTypeInterface
$contactType
$emailAddress
E-Mail address.
protected
EmailAddressInterface
$emailAddress
Methods
__construct()
Constructor
public
__construct([EmailAddressInterface $emailAddress = null ][, ContactTypeInterface $contactType = null ][, ContactNameInterface $contactName = null ]) : mixed
Parameters
- $emailAddress : EmailAddressInterface = null
-
(optional) E-Mail address.
- $contactType : ContactTypeInterface = null
-
(optional) E-Mail contact name.
- $contactName : ContactNameInterface = null
-
(optional) E-Mail contact type.
Return values
mixed —__toString()
Return contact information as a string.
public
__toString() : string
Example Output: 'John Doe email@address.com'
Return values
string —Converted string.
getContactName()
Returns the contact name of an email.
public
getContactName() : string
Return values
string —E-Mail contact name.
getContactType()
Returns the contact type of an email.
public
getContactType() : ContactTypeInterface
Return values
ContactTypeInterface —E-Mail contact type.
getEmailAddress()
Returns an email address.
public
getEmailAddress() : string
Return values
string —E-Mail address.
setContactName()
Sets the contact name of an email.
public
setContactName(ContactNameInterface $contactName) : mixed
Parameters
- $contactName : ContactNameInterface
-
E-Mail contact name.
Return values
mixed —setContactType()
Sets the contact type of an email.
public
setContactType(ContactTypeInterface $contactType) : mixed
Parameters
- $contactType : ContactTypeInterface
-
E-Mail contact type.
Return values
mixed —setEmailAddress()
Sets an email address.
public
setEmailAddress(EmailAddressInterface $emailAddress) : mixed
Parameters
- $emailAddress : EmailAddressInterface
-
E-Mail address.