Trait EmailAwareTrait
For objects that are or interact with emails.
Methods summary
protected
string
|
#
emailToArray( mixed $var )
Convert an email address (RFC822) into a proper array notation.
Convert an email address (RFC822) into a proper array notation.
Parameters
- $var
- An email array (containing an "email" key and optionally a "name" key).
Returns
string
Throws
InvalidArgumentException If the email is invalid.
|
protected
string
|
#
emailFromArray( array $arr )
Convert an email address array to a RFC-822 string notation.
Convert an email address array to a RFC-822 string notation.
Parameters
- $arr
- An email array (containing an "email" key and optionally a "name" key).
Returns
string
Throws
InvalidArgumentException If the email array is invalid.
|