ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilMailAddress.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
9 {
13  protected $mailbox = '';
14 
18  protected $host = '';
19 
25  public function __construct(string $mailbox, string $host)
26  {
27  $this->mailbox = $mailbox;
28  $this->host = $host;
29  }
30 
34  public function setHost(string $host)
35  {
36  $this->host = $host;
37  }
38 
42  public function setMailbox(string $mailbox)
43  {
44  $this->mailbox = $mailbox;
45  }
46 
50  public function getHost() : string
51  {
52  return $this->host;
53  }
54 
58  public function getMailbox() : string
59  {
60  return $this->mailbox;
61  }
62 
66  public function __toString() : string
67  {
68  return implode('@', [
69  $this->getMailbox(),
70  $this->getHost(),
71  ]);
72  }
73 }
__construct(string $mailbox, string $host)
ilMailAddress constructor.
setMailbox(string $mailbox)
setHost(string $host)
Class ilMailAddress.