ILIAS  release_8 Revision v8.24
class.ilMailOnlyExternalAddressList.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
26{
28 protected string $installationHost;
31
36 public function __construct(
38 string $installationHost,
40 ) {
41 $this->origin = $origin;
42 $this->installationHost = $installationHost;
43 $this->getUsrIdByLoginCallable = $getUsrIdByLoginCallable;
44 }
45
46 public function value(): array
47 {
48 $addresses = $this->origin->value();
49
50 $filteredAddresses = array_filter($addresses, function (ilMailAddress $address): bool {
52 if ($c((string) $address)) {
53 // Fixed mantis bug #5875
54 return false;
55 }
56
57 if ($address->getHost() === $this->installationHost) {
58 return false;
59 }
60
61 if (strpos($address->getMailbox(), '#') === 0) {
62 return false;
63 }
64
65 return true;
66 });
67
68 return $filteredAddresses;
69 }
70}
Class ilMailAddress.
Class ilMailOnlyExternalAddressList.
__construct(ilMailAddressList $origin, string $installationHost, callable $getUsrIdByLoginCallable)
$c
Definition: cli.php:38
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: confirmReg.php:20
Interface ilMailAddressList.