ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilMailOnlyExternalAddressList Class Reference

Class ilMailOnlyExternalAddressList. More...

+ Inheritance diagram for ilMailOnlyExternalAddressList:
+ Collaboration diagram for ilMailOnlyExternalAddressList:

Public Member Functions

 __construct (\ilMailAddressList $origin, string $installationHost)
 ilMailOnlyExternalAddressList constructor. More...
 
 value ()
 
Returns
[]
More...
 

Protected Attributes

 $origin
 
 $installationHost
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMailOnlyExternalAddressList::__construct ( \ilMailAddressList  $origin,
string  $installationHost 
)

ilMailOnlyExternalAddressList constructor.

Parameters
\ilMailAddressList$origin
string$installationHost

Definition at line 21 of file class.ilMailOnlyExternalAddressList.php.

References $installationHost, and $origin.

Member Function Documentation

◆ value()

ilMailOnlyExternalAddressList::value ( )

Returns
[]

Implements ilMailAddressList.

Definition at line 30 of file class.ilMailOnlyExternalAddressList.php.

References $installationHost, and ilObjUser\_lookupId().

30  : array
31  {
32  $addresses = $this->origin->value();
33 
34  $filteredAddresses = array_filter($addresses, function (\ilMailAddress $address) {
35  if (\ilObjUser::_lookupId((string) $address)) {
36  // Fixed mantis bug #5875
37  return false;
38  }
39 
40  if ($address->getHost() === $this->installationHost) {
41  return false;
42  }
43 
44  if ('#' === substr($address->getMailbox(), 0, 1)) {
45  return false;
46  }
47 
48  return true;
49  });
50 
51  return $filteredAddresses;
52  }
static _lookupId($a_user_str)
Lookup id by login.
Class ilMailAddress.
+ Here is the call graph for this function:

Field Documentation

◆ $installationHost

ilMailOnlyExternalAddressList::$installationHost
protected

Definition at line 14 of file class.ilMailOnlyExternalAddressList.php.

Referenced by __construct(), and value().

◆ $origin

ilMailOnlyExternalAddressList::$origin
protected

Definition at line 11 of file class.ilMailOnlyExternalAddressList.php.

Referenced by __construct().


The documentation for this class was generated from the following file: