FileAccess Orion

Address
in package

Tags
author

Fabien Potencier fabien@symfony.com

Table of Contents

FROM_STRING_PATTERN  = '~(?<displayName>[^<]*)<(?<addrSpec>.*)>[^>]*~'
A regex that matches a structure like 'Name <email@address.com>'.
$address  : mixed
$encoder  : mixed
$name  : mixed
$validator  : mixed
__construct()  : mixed
create()  : self
createArray()  : array<string|int, Address>
fromString()  : self
getAddress()  : string
getEncodedAddress()  : string
getName()  : string
toString()  : string

Constants

FROM_STRING_PATTERN

A regex that matches a structure like 'Name <email@address.com>'.

private mixed FROM_STRING_PATTERN = '~(?<displayName>[^<]*)<(?<addrSpec>.*)>[^>]*~'

It matches anything between the first < and last > as email address. This allows to use a single string to construct an Address, which can be convenient to use in config, and allows to have more readable config. This does not try to cover all edge cases for address.

Properties

$encoder

private static mixed $encoder

$validator

private static mixed $validator

Methods

__construct()

public __construct(string $address[, string $name = '' ]) : mixed
Parameters
$address : string
$name : string = ''
Return values
mixed —

create()

public static create(Address|string $address) : self
Parameters
$address : Address|string
Return values
self —

createArray()

public static createArray(array<string|int, \Symfony\Component\Mime\Address|string> $addresses) : array<string|int, Address>
Parameters
$addresses : array<string|int, \Symfony\Component\Mime\Address|string>
Return values
array<string|int, Address> —

fromString()

public static fromString(string $string) : self
Parameters
$string : string
Return values
self —

getAddress()

public getAddress() : string
Return values
string —

getEncodedAddress()

public getEncodedAddress() : string
Return values
string —

getName()

public getName() : string
Return values
string —

toString()

public toString() : string
Return values
string —

Search results