ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilMailAddress.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{
11 protected $mailbox = '';
12
14 protected $host = '';
15
21 public function __construct(string $mailbox, string $host)
22 {
23 $this->mailbox = $mailbox;
24 $this->host = $host;
25 }
26
30 public function setHost(string $host)
31 {
32 $this->host = $host;
33 }
34
38 public function setMailbox(string $mailbox)
39 {
40 $this->mailbox = $mailbox;
41 }
42
46 public function getHost() : string
47 {
48 return $this->host;
49 }
50
54 public function getMailbox() : string
55 {
56 return $this->mailbox;
57 }
58
62 public function __toString() : string
63 {
64 return implode('@', [
65 $this->getMailbox(),
66 $this->getHost(),
67 ]);
68 }
69}
An exception for terminatinating execution or to throw for unit testing.
Class ilMailAddress.
setHost(string $host)
__construct(string $mailbox, string $host)
ilMailAddress constructor.
setMailbox(string $mailbox)