| 1 | <?php |
||
| 15 | abstract class AbstractRecipient implements HeaderInterface |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var AddressList |
||
| 19 | */ |
||
| 20 | private $recipients; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * To constructor. |
||
| 24 | * @param AddressList $recipients |
||
| 25 | */ |
||
| 26 | 16 | final public function __construct(AddressList $recipients) |
|
| 30 | |||
| 31 | /** |
||
| 32 | * @return HeaderName |
||
| 33 | */ |
||
| 34 | abstract public function getName(): HeaderName; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return HeaderValue |
||
| 38 | */ |
||
| 39 | 16 | final public function getValue(): HeaderValue |
|
| 43 | |||
| 44 | /** |
||
| 45 | * @param string $emailAddress |
||
| 46 | * @param string $name |
||
| 47 | * @return AbstractRecipient |
||
| 48 | */ |
||
| 49 | 1 | final public static function fromSingleRecipient(string $emailAddress, string $name = ''): AbstractRecipient |
|
| 60 | } |