ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilMailPearRfc822WrapperAddressParser.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 {
13  public function parseAddressString(string $addresses) : array
14  {
15  if (0 === strlen($addresses)) {
16  return [];
17  }
18 
19  $parser = new Mail_RFC822();
20  $parsed_addresses = $parser->parseAddressList($addresses, $this->installationHost, false, true);
21 
22  return array_map(function ($address) {
23  return new ilMailAddress($address->mailbox, $address->host);
24  }, $parsed_addresses);
25  }
26 }
Class ilMailPearRfc822WrapperAddressParser.
Class ilBaseMailRfc822AddressParser.
Class ilMailAddress.