Completed
Push — master ( 70dfe1...a97a1c )
by Torben
04:18
created

ModifyUserMessageSenderEvent::setReplyToEmail()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Extension "sf_event_mgt" for TYPO3 CMS.
7
 *
8
 * For the full copyright and license information, please read the
9
 * LICENSE.txt file that was distributed with this source code.
10
 */
11
12
namespace DERHANSEN\SfEventMgt\Event;
13
14
use DERHANSEN\SfEventMgt\Domain\Model\Registration;
15
use DERHANSEN\SfEventMgt\Service\NotificationService;
16
17
/**
18
 * This event should be used to modify the sender data of a user message. Use the $type variable to distinguish
19
 * between the different types of messages
20
 */
21
final class ModifyUserMessageSenderEvent
22
{
23
    /**
24
     * @var string
25
     */
26
    private $senderName;
27
28
    /**
29
     * @var string
30
     */
31
    private $senderEmail;
32
33
    /**
34
     * @var string
35
     */
36
    private $replyToEmail;
37
38
    /**
39
     * @var Registration
40
     */
41
    private $registration;
42
43
    /**
44
     * @var int
45
     */
46
    private $type;
47
48
    /**
49
     * @var NotificationService
50
     */
51
    private $notificationService;
52
53
    public function __construct(
54
        string $senderName,
55
        string $senderEmail,
56
        string $replyToEmail,
57
        Registration $registration,
58
        int $type,
59
        NotificationService $notificationService
60
    ) {
61
        $this->senderName = $senderName;
62
        $this->senderEmail = $senderEmail;
63
        $this->replyToEmail = $replyToEmail;
64
        $this->registration = $registration;
65
        $this->type = $type;
66
        $this->notificationService = $notificationService;
67
    }
68
69
    /**
70
     * @return string
71
     */
72
    public function getSenderName(): string
73
    {
74
        return $this->senderName;
75
    }
76
77
    /**
78
     * @return string
79
     */
80
    public function getSenderEmail(): string
81
    {
82
        return $this->senderEmail;
83
    }
84
85
    /**
86
     * @return string
87
     */
88
    public function getReplyToEmail(): string
89
    {
90
        return $this->replyToEmail;
91
    }
92
93
    /**
94
     * @return Registration
95
     */
96
    public function getRegistration(): Registration
97
    {
98
        return $this->registration;
99
    }
100
101
    /**
102
     * @return int
103
     */
104
    public function getType(): int
105
    {
106
        return $this->type;
107
    }
108
109
    /**
110
     * @return NotificationService
111
     */
112
    public function getNotificationService(): NotificationService
113
    {
114
        return $this->notificationService;
115
    }
116
117
    /**
118
     * @param string $senderName
119
     */
120
    public function setSenderName(string $senderName): void
121
    {
122
        $this->senderName = $senderName;
123
    }
124
125
    /**
126
     * @param string $senderEmail
127
     */
128
    public function setSenderEmail(string $senderEmail): void
129
    {
130
        $this->senderEmail = $senderEmail;
131
    }
132
133
    /**
134
     * @param string $replyToEmail
135
     */
136
    public function setReplyToEmail(string $replyToEmail): void
137
    {
138
        $this->replyToEmail = $replyToEmail;
139
    }
140
}
141