ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilBaseMailRfc822AddressParser.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
26 {
30  protected string $addresses = '';
31  protected string $installationHost = '';
32 
36  public function __construct(string $addresses, string $installationHost = ilMail::ILIAS_HOST)
37  {
38  $this->addresses = $addresses;
39  $this->installationHost = $installationHost;
40  }
41 
45  public function getAddresses(): string
46  {
47  return $this->addresses;
48  }
49 
54  abstract protected function parseAddressString(string $addresses): array;
55 
56  public function parse(): array
57  {
58  $addresses = preg_replace('/;/', ',', trim($this->addresses));
59 
60  return $this->parseAddressString($addresses);
61  }
62 }
const ILIAS_HOST
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
parseAddressString(string $addresses)
Class ilBaseMailRfc822AddressParser.
__construct(string $addresses, string $installationHost=ilMail::ILIAS_HOST)