ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilMailAddress.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21class ilMailAddress implements Stringable
22{
23 public function __construct(protected string $mailbox, protected string $host)
24 {
25 }
26
27 public function setHost(string $host): void
28 {
29 $this->host = $host;
30 }
31
32 public function setMailbox(string $mailbox): void
33 {
34 $this->mailbox = $mailbox;
35 }
36
37 public function getHost(): string
38 {
39 return $this->host;
40 }
41
42
43 public function getMailbox(): string
44 {
45 return $this->mailbox;
46 }
47
48 public function __toString(): string
49 {
50 return implode('@', [
51 $this->getMailbox(),
52 $this->getHost(),
53 ]);
54 }
55}
__construct(protected string $mailbox, protected string $host)
setHost(string $host)
setMailbox(string $mailbox)