ILIAS  trunk Revision v11.0_alpha-1702-gfd3ecb7f852
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilMailPearRfc822WrapperAddressParser.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
26 {
27  protected function parseAddressString(string $addresses): array
28  {
29  if ($addresses === '') {
30  return [];
31  }
32 
33  $parser = new Mail_RFC822();
34  $parsed_addresses = $parser->parseAddressList(
35  $addresses,
36  $this->installationHost,
37  false,
38  true
39  );
40 
41  return array_map(static function (stdClass $address): ilMailAddress {
42  return new ilMailAddress($address->mailbox, $address->host);
43  }, $parsed_addresses);
44  }
45 }
Class ilBaseMailRfc822AddressParser.
Class ilMailAddress.