PluginProbe
The Innovative Form Builder – IvyForms / 1.1
The Innovative Form Builder – IvyForms v1.1
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / backend / src / ValueObjects / Notification / NotificationContact.php

NotificationContact.php in The Innovative Form Builder – IvyForms 1.1, at backend/src/ValueObjects/Notification/NotificationContact.php

69 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace IvyForms\ValueObjects\Notification;
4
5 use IvyForms\Common\Exceptions\ValidationException;
6
7 /**
8 * Value Object for Notification Contact Information
9 *
10 * @package IvyForms\ValueObjects\Notification
11 */
12 final class NotificationContact
13 {
14 private string $sender;
15 private string $receiver;
16 private string $replyTo;
17
18 public function __construct(string $sender, string $receiver, string $replyTo = '')
19 {
20 $this->sender = $sender;
21 $this->receiver = $receiver;
22 $this->replyTo = $replyTo;
23 }
24
25 public function getSender(): string
26 {
27 return $this->sender;
28 }
29
30 public function getReceiver(): string
31 {
32 return $this->receiver;
33 }
34
35 public function getReplyTo(): string
36 {
37 return $this->replyTo;
38 }
39
40 public function setSender(string $sender): void
41 {
42 $this->sender = $sender;
43 }
44
45 public function setReceiver(string $receiver): void
46 {
47 $this->receiver = $receiver;
48 }
49
50 public function setReplyTo(string $replyTo): void
51 {
52 $this->replyTo = $replyTo;
53 }
54
55 /**
56 * Convert contact information to array
57 *
58 * @return array<string, string>
59 */
60 public function toArray(): array
61 {
62 return [
63 'sender' => $this->sender,
64 'receiver' => $this->receiver,
65 'replyTo' => $this->replyTo,
66 ];
67 }
68 }
69