6 use Laminas\Mail\Address as ZendAddress;
7 use Laminas\Validator\EmailAddress as EmailAddressValidator;
27 $name = html_entity_decode(
$name, ENT_QUOTES | ENT_XHTML,
'UTF-8');
56 $emailAddressValidator =
new EmailAddressValidator(Hostname::ALLOW_DNS | Hostname::ALLOW_LOCAL);
57 if (!$emailAddressValidator->isValid(
$email)) {
58 $invalidMessages = $emailAddressValidator->getMessages();
76 if (!is_string(
$name)) {
84 $this->
name = html_entity_decode(
$name, ENT_QUOTES | ENT_XHTML,
'UTF-8');
134 $containsName =
preg_match(
'/<(.*)>/', $address, $matches) == 1;
137 return new static($matches[1],
$name);
140 return new static(
trim($address));
172 return $mail->toString();
getEntity()
Returns the saved entity.
Exception thrown if an argument is not of the expected type.
if(!$user||!$user->canDelete()) $name
c Accompany it with the information you received as to the offer to distribute corresponding source complete source code means all the source code for all modules it plus any associated interface definition plus the scripts used to control compilation and installation of the executable as a special the source code distributed need not include anything that is normally and so on of the operating system on which the executable unless that component itself accompanies the executable If distribution of executable or object code is made by offering access to copy from a designated then offering equivalent access to copy the source code from the same place counts as distribution of the source even though third parties are not compelled to copy the source along with the object code You may not or distribute the Program except as expressly provided under this License Any attempt otherwise to sublicense or distribute the Program is void
static getFormattedEmailAddress($email, $name=null)
Format an email address and name into a formatted email address.
elgg_strpos()
Wrapper function for mb_strpos().
static fromString($address, $comment=null)
Parses strings like "Evan <evan@elgg.org>" into name/email objects.
__construct($email, $name=null, $comment=null)
{}
elgg_substr()
Wrapper function for mb_substr().
setName($name)
Set the name.
unsetName()
Clear the name from the email address.
setEntity(\ElggEntity $entity)
Store the ElggEntity related to this Address.
static fromEntity(\ElggEntity $entity)
Create an Address based on a Entity.
setEmail($email)
Set the email address.
getDisplayName()
Get the entity's display name.