ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilBaseMailRfc822AddressParser.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2/* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3
9{
11 protected $addresses = '';
12
14 protected $installationHost = '';
15
21 {
22 $this->addresses = $addresses;
23 $this->installationHost = $installationHost;
24 }
25
29 public function getAddresses() : string
30 {
31 return $this->addresses;
32 }
33
38 public function setAddresses(string $addresses)
39 {
40 $this->addresses = $addresses;
41 }
42
47 abstract protected function parseAddressString(string $addresses) : array;
48
52 public function parse() : array
53 {
54 $addresses = preg_replace('/;/', ',', trim($this->addresses));
55
56 return $this->parseAddressString($addresses);
57 }
58}
An exception for terminatinating execution or to throw for unit testing.
Class ilBaseMailRfc822AddressParser.
parseAddressString(string $addresses)
__construct(string $addresses, string $installationHost=ilMail::ILIAS_HOST)
setAddresses(string $addresses)
A comma separated list of email addresses.
const ILIAS_HOST
Interface ilMailRecipientParser.