ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilBaseMailRfc822AddressParser.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
9 {
11  protected $addresses = '';
12 
14  protected $installationHost = '';
15 
20  public function __construct(string $a_addresses, string $installationHost = \ilMail::ILIAS_HOST)
21  {
22  $this->addresses = $a_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 $a_addresses) : array;
48 
52  public function parse() : array
53  {
54  $addresses = preg_replace('/;/', ',', trim($this->addresses));
55 
56  return $this->parseAddressString($addresses);
57  }
58 }
const ILIAS_HOST
Interface ilMailRecipientParser.
Class ilBaseMailRfc822AddressParser.
setAddresses(string $addresses)
A comma separated list of email addresses.
parseAddressString(string $a_addresses)
__construct(string $a_addresses, string $installationHost=\ilMail::ILIAS_HOST)